From 64d1b721ca49496bd53d3cb62479d97b5e3690d7 Mon Sep 17 00:00:00 2001 From: shimunn <> Date: Mon, 13 May 2019 22:05:59 +0200 Subject: [PATCH] enhanced .service --- gitedditor.service | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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"