From d72155cd86c2ded013b06a720522ec2f37b6b3f3 Mon Sep 17 00:00:00 2001 From: Felix Van der Jeugt Date: Tue, 29 Oct 2019 19:40:41 +0100 Subject: [PATCH] Add consistency to service files --- services/notmuch/notmuch | 12 ++++++------ services/notmuch/run | 2 +- services/vdirsyncer/vdirsyncer | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/services/notmuch/notmuch b/services/notmuch/notmuch index 284f62f..517ee48 100755 --- a/services/notmuch/notmuch +++ b/services/notmuch/notmuch @@ -1,11 +1,11 @@ -#!/bin/sh +#!/bin/sh -e # check for internet connection -ip route ls | grep -v '' && exit 1 +ip route ls | grep -q '.' # check if the gpg-agent is running -pgrep gpg-agent >/dev/null || exit 2 +pgrep gpg-agent > /dev/null -notmuch --config="$HOME/.notmuch-config" new --quiet 2>&1 \ - | xargs -0 --no-run-if-empty notify-send \ - && exec sleep 3m +notmuch new --quiet 2>&1 | xargs -0 --no-run-if-empty notify-send + +exec sleep 3m diff --git a/services/notmuch/run b/services/notmuch/run index 6102220..b02984a 100755 --- a/services/notmuch/run +++ b/services/notmuch/run @@ -1,5 +1,5 @@ #!/bin/sh -exec env \ +exec env \ HOME="${HOME:-/home/noctua}" \ XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-/home/noctua/.config}" \ LC_ALL="en_US.utf-8" \ diff --git a/services/vdirsyncer/vdirsyncer b/services/vdirsyncer/vdirsyncer index c4bcd3a..ab74d3b 100755 --- a/services/vdirsyncer/vdirsyncer +++ b/services/vdirsyncer/vdirsyncer @@ -1,10 +1,10 @@ #!/bin/sh -e # check for internet connection -! ip route ls | grep -v '' +ip route ls | grep -q '.' # check if the gpg-agent is running -pgrep gpg-agent >/dev/null +pgrep gpg-agent > /dev/null vdirsyncer -v WARNING sync 2>&1