move cron to shell
This commit is contained in:
parent
19cce31a09
commit
f20864f42e
2 changed files with 11 additions and 3 deletions
4
Procfile
4
Procfile
|
@ -1,4 +1,2 @@
|
|||
dockergen: docker-gen -watch -notify "/app/updatessl.sh updatessl" /app/nginx.tmpl /etc/nginx/conf.d/default.conf
|
||||
nginx: nginx
|
||||
cron: cron && tail -f /dev/null
|
||||
|
||||
nginx: nginx
|
10
updatessl.sh
10
updatessl.sh
|
@ -10,6 +10,15 @@ DEFAULT_CONF="/etc/nginx/conf.d/default.conf"
|
|||
CERTS="/etc/nginx/certs"
|
||||
|
||||
|
||||
startcron() {
|
||||
if service cron status | grep "cron is running"; then
|
||||
echo "cron is running, skip"
|
||||
else
|
||||
service cron start
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
updatessl() {
|
||||
|
||||
if grep ACME_DOMAINS $DEFAULT_CONF ; then
|
||||
|
@ -33,6 +42,7 @@ updatessl() {
|
|||
}
|
||||
|
||||
|
||||
startcron
|
||||
|
||||
"$@"
|
||||
|
||||
|
|
Loading…
Reference in a new issue