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

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