Add consistency to service files
This commit is contained in:
parent
b2072e7189
commit
d72155cd86
@ -1,11 +1,11 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh -e
|
||||||
|
|
||||||
# check for internet connection
|
# check for internet connection
|
||||||
ip route ls | grep -v '' && exit 1
|
ip route ls | grep -q '.'
|
||||||
|
|
||||||
# check if the gpg-agent is running
|
# 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 \
|
notmuch new --quiet 2>&1 | xargs -0 --no-run-if-empty notify-send
|
||||||
| xargs -0 --no-run-if-empty notify-send \
|
|
||||||
&& exec sleep 3m
|
exec sleep 3m
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
#!/bin/sh -e
|
#!/bin/sh -e
|
||||||
|
|
||||||
# check for internet connection
|
# check for internet connection
|
||||||
! ip route ls | grep -v ''
|
ip route ls | grep -q '.'
|
||||||
|
|
||||||
# check if the gpg-agent is running
|
# check if the gpg-agent is running
|
||||||
pgrep gpg-agent >/dev/null
|
pgrep gpg-agent > /dev/null
|
||||||
|
|
||||||
vdirsyncer -v WARNING sync 2>&1
|
vdirsyncer -v WARNING sync 2>&1
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user