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/*/lock
services/*/current
services/*/down
# other
*.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
exec env \
HOME="${HOME:-/home/noctua}" \
XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-/home/noctua/.config}" \
LC_ALL="en_US.utf-8" \
LANG="en_US.utf-8" \
PATH="/usr/local/bin:$HOME/.local/bin:$PATH" \
DISPLAY="${DISPLAY:-:0}" \
./notmuch
export USER="$(whoami)"
export HOME=/home/"$USER"
export DISPLAY=":0"
. "$HOME"/.profile
set -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,9 @@
#!/bin/sh -e
exec > /dev/null
exec env -i \
HOME="${HOME:-/home/noctua}" \
XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-/home/noctua/.config}" \
XDG_CACHE_HOME="${XDG_CONFIG_HOME:-/home/noctua/.cache}" \
PATH="/usr/local/bin:$HOME/.cargo/bin:$PATH" \
DISPLAY=":0" \
/home/noctua/.cargo/bin/spotifyd --no-daemon
#!/bin/sh
export USER="$(whoami)"
export HOME=/home/"$USER"
export DISPLAY=":0"
. "$HOME/.profile"
spotifyd --no-daemon 2>&1 \
| tee -a $XDG_RUNTIME_DIR/playlist \
| sed '/trunc/d;/loaded$/d;/^Loading/d'

View File

@ -1,9 +1,17 @@
#!/bin/sh
exec env \
HOME="${HOME:-/home/noctua}" \
XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-/home/noctua/.config}" \
LC_ALL="en_US.utf-8" \
LANG="en_US.utf-8" \
PATH="/usr/local/bin:$HOME/.local/bin:$PATH" \
DISPLAY="${DISPLAY:-:0}" \
./vdirsyncer
export USER="$(whoami)"
export HOME=/home/"$USER"
export DISPLAY=":0"
. "$HOME"/.profile
set -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

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