diff --git a/gitedditor.service b/gitedditor.service index 6f2552d..6118c12 100644 --- a/gitedditor.service +++ b/gitedditor.service @@ -13,7 +13,9 @@ Environment=ROOT_DIR=/srv/reddit RestartSec=7200 Restart=always -ExecStart=/usr/bin/rkt --insecure-options=image run --dns 8.8.8.8 --volume volume-repo,kind=host,source=${ROOT_DIR}/${GITREDDITOR_U} \ +ExecStartPre=/bin/bash -c "cd ${ROOT_DIR}/${GITREDDITOR_U} && /usr/bin/git pull" + +ExecStart=/usr/bin/rkt --insecure-options=image run --inherit-env --dns 8.8.8.8 --volume volume-repo,kind=host,source=${ROOT_DIR}/${GITREDDITOR_U} \ docker://repo.shimun.net/shimun/gitredditor ExecStopPost=/bin/bash -c "cd ${ROOT_DIR}/${GITREDDITOR_U} && /usr/bin/git push"