diff --git a/crontab b/crontab index 1856f14..c8fb741 100644 --- a/crontab +++ b/crontab @@ -8,4 +8,4 @@ SHELL=/bin/sh PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin # m | h | day of month | month | day of week | user | command -5 2 * * * root docker -H tcp://127.0.0.1:2375 exec dockerreverseproxystack_reverse-proxy_1 certbot renew > /proc/1/fd/2 2>&1 +7 2 * * * root docker -H tcp://127.0.0.1:2375 exec dockerreverseproxystack_reverse-proxy_1 certbot renew > /proc/1/fd/2 2>&1 diff --git a/start_or_update.sh b/start_or_update.sh index 3a851ec..4fc3e35 100755 --- a/start_or_update.sh +++ b/start_or_update.sh @@ -1,4 +1,5 @@ #!/bin/bash - -unset VERSION; VERSION=$(git ls-remote ssh://git@git.scimetis.net:2222/yohan/docker-reverse-proxy.git| head -1 | cut -f 1|cut -c -10) sudo -E bash -c 'docker-compose up -d' +sudo chown root. crontab +# --force-recreate is used to recreate container when crontab file has changed +unset VERSION; VERSION=$(git ls-remote ssh://git@git.scimetis.net:2222/yohan/docker-reverse-proxy.git| head -1 | cut -f 1|cut -c -10) sudo -E bash -c 'docker-compose up -d --force-recreate'