diff options
| author | Arpit Chakladar <arpitchakladar@gmail.com> | 2026-09-24 05:16:08 +0530 |
|---|---|---|
| committer | Arpit Chakladar <arpitchakladar@gmail.com> | 2026-09-24 05:16:08 +0530 |
| commit | a6ad66572e9cc985d3123286b132605ba279b919 (patch) | |
| tree | 52517cd294b3d024068864e751e71b65eb667806 /modules/communication/neomutt/neomutt-sync-daemon.sh | |
| parent | a0213d48a3fea3b2209c36390331de101fb7575f (diff) | |
| download | home-manager-config-a6ad66572e9cc985d3123286b132605ba279b919.tar.gz home-manager-config-a6ad66572e9cc985d3123286b132605ba279b919.zip | |
feat(communication/neomutt): neomutt-sync daemon runs once after closing
Diffstat (limited to 'modules/communication/neomutt/neomutt-sync-daemon.sh')
| -rw-r--r-- | modules/communication/neomutt/neomutt-sync-daemon.sh | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/modules/communication/neomutt/neomutt-sync-daemon.sh b/modules/communication/neomutt/neomutt-sync-daemon.sh index a78ef5f..d148567 100644 --- a/modules/communication/neomutt/neomutt-sync-daemon.sh +++ b/modules/communication/neomutt/neomutt-sync-daemon.sh @@ -28,12 +28,15 @@ sync_once() { while true; do sync_once "$@" - sleep "$INTERVAL" # Safety net: the launcher stops this service when neomutt exits; if that # didn't happen (hard kill), bail out once neomutt is gone. - if ! pgrep -x neomutt >/dev/null; then + if ! pgrep -x neomutt-launche >/dev/null; then echo "neomutt is not running; stopping sync daemon" >&2 exit 0 fi + + # Sleep after syncing and trying to exit, this makes sure that it runs once + # after all neomutt instances closes + sleep "$INTERVAL" done |
