simplify service definitions

This commit is contained in:
Felix Van der Jeugt 2020-10-16 10:25:48 +02:00
parent 3baff6a2ad
commit 83204601bd
No known key found for this signature in database
GPG Key ID: 58B209295023754D
6 changed files with 42 additions and 47 deletions

1
.gitignore vendored
View File

@ -17,6 +17,7 @@ vim/spell
services/*/supervise services/*/supervise
services/*/lock services/*/lock
services/*/current services/*/current
services/*/down
# other # other
*.pyc *.pyc

View File

@ -1,11 +0,0 @@
#!/bin/sh -e
# check for internet connection
ip route ls | grep -q '.'
# check if the gpg-agent is running
pgrep gpg-agent > /dev/null
notmuch new --quiet 2>&1
exec sleep 1m

View File

@ -1,9 +1,17 @@
#!/bin/sh #!/bin/sh
exec env \ export USER="$(whoami)"
HOME="${HOME:-/home/noctua}" \ export HOME=/home/"$USER"
XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-/home/noctua/.config}" \ export DISPLAY=":0"
LC_ALL="en_US.utf-8" \ . "$HOME"/.profile
LANG="en_US.utf-8" \
PATH="/usr/local/bin:$HOME/.local/bin:$PATH" \ set -e
DISPLAY="${DISPLAY:-:0}" \
./notmuch # check for internet connection
ip route ls | grep -q '.'
# check if the gpg-agent is running
pgrep gpg-agent > /dev/null
notmuch new --quiet 2>&1
exec sleep 1m

View File

@ -1,9 +1,9 @@
#!/bin/sh -e #!/bin/sh
exec > /dev/null export USER="$(whoami)"
exec env -i \ export HOME=/home/"$USER"
HOME="${HOME:-/home/noctua}" \ export DISPLAY=":0"
XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-/home/noctua/.config}" \ . "$HOME/.profile"
XDG_CACHE_HOME="${XDG_CONFIG_HOME:-/home/noctua/.cache}" \
PATH="/usr/local/bin:$HOME/.cargo/bin:$PATH" \ spotifyd --no-daemon 2>&1 \
DISPLAY=":0" \ | tee -a $XDG_RUNTIME_DIR/playlist \
/home/noctua/.cargo/bin/spotifyd --no-daemon | sed '/trunc/d;/loaded$/d;/^Loading/d'

View File

@ -1,9 +1,17 @@
#!/bin/sh #!/bin/sh
exec env \ export USER="$(whoami)"
HOME="${HOME:-/home/noctua}" \ export HOME=/home/"$USER"
XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-/home/noctua/.config}" \ export DISPLAY=":0"
LC_ALL="en_US.utf-8" \ . "$HOME"/.profile
LANG="en_US.utf-8" \
PATH="/usr/local/bin:$HOME/.local/bin:$PATH" \ set -e
DISPLAY="${DISPLAY:-:0}" \
./vdirsyncer # check for internet connection
ip route ls | grep -q '.'
# check if the gpg-agent is running
pgrep gpg-agent > /dev/null
vdirsyncer -v CRITICAL sync 2>&1
exec sleep 10m

View File

@ -1,11 +0,0 @@
#!/bin/sh -e
# check for internet connection
ip route ls | grep -q '.'
# check if the gpg-agent is running
pgrep gpg-agent > /dev/null
vdirsyncer -v CRITICAL sync 2>&1
exec sleep 10m