Fixed crontab owner.

This commit is contained in:
yohan 2018-12-29 03:20:07 +01:00
parent bf0e7c944f
commit fa4c498c8d
2 changed files with 4 additions and 3 deletions

View File

@ -8,4 +8,4 @@ SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
# m | h | day of month | month | day of week | user | command # 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

View File

@ -1,4 +1,5 @@
#!/bin/bash #!/bin/bash
sudo chown root. crontab
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 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'