diff options
Diffstat (limited to 'modules/communication/neomutt/neomutt-launcher.sh')
| -rw-r--r-- | modules/communication/neomutt/neomutt-launcher.sh | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/modules/communication/neomutt/neomutt-launcher.sh b/modules/communication/neomutt/neomutt-launcher.sh new file mode 100644 index 0000000..62cbe09 --- /dev/null +++ b/modules/communication/neomutt/neomutt-launcher.sh @@ -0,0 +1,12 @@ +#!/usr/bin/env bash +# Wrapped neomutt: keeps the neomutt-sync systemd daemon alive for the +# lifetime of a neomutt session. +set -uo pipefail + +systemctl --user start neomutt-sync.service || true +stop_service() { + pgrep -x neomutt >/dev/null || systemctl --user stop neomutt-sync.service || true +} +trap stop_service EXIT + +"@@NEOMUTT_BIN@@" "$@" |
