~whynothugo/superd-services

himitsud: remove socket after crash v1 PROPOSED

Edd Salkield: 1
 himitsud: remove socket after crash

 1 files changed, 1 insertions(+), 0 deletions(-)
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.sr.ht/~whynothugo/superd-services/patches/42602/mbox | git am -3
Learn more about email & git

[PATCH] himitsud: remove socket after crash Export this patch

Currently if himitsud crashes, it leaves behind socket file
$XDG_RUNTIME_DIR/himitsu, which prevents himitsud from restarting.

This patch carefully checks on startup whether this file exists when
the current user is not running himitsud, and cleans it up if necessary.

---
 himitsud.service | 1 +
 1 file changed, 1 insertion(+)

diff --git a/himitsud.service b/himitsud.service
index 36db6d6..e9ae321 100644
--- a/himitsud.service
+++ b/himitsud.service
@@ -4,4 +4,5 @@ Documentation=man:himitsu(7)

[Service]
ExecStart=himitsud
ExecStartPre=sh -c 'if [ -n "$XDG_RUNTIME_DIR" ] && [ -S "$XDG_RUNTIME_DIR/himitsu" ]; then rm "$XDG_RUNTIME_DIR/himitsu"; fi'
Restart=always
-- 
2.40.1