diff --git a/docker/proxy/Dockerfile b/docker/proxy/Dockerfile index 34fd5c43..1ec002c3 100644 --- a/docker/proxy/Dockerfile +++ b/docker/proxy/Dockerfile @@ -1,4 +1,4 @@ -# modify time: 202310251532, you can modify here to trigger Docker Build action +# modify time: 2023102516, you can modify here to trigger Docker Build action # from Dockerfile: https://github.com/NginxProxyManager/nginx-proxy-manager/blob/develop/docker/Dockerfile # from image: https://hub.docker.com/r/jc21/nginx-proxy-manager diff --git a/docker/proxy/s6/w9init/migration.sh b/docker/proxy/s6/w9init/migration.sh index 4ae0f96d..50d4131b 100644 --- a/docker/proxy/s6/w9init/migration.sh +++ b/docker/proxy/s6/w9init/migration.sh @@ -3,13 +3,15 @@ set +e nginx_proxy(){ - if [ $(stat -c %Y /etc/shadow) -gt $(stat -c %Y /data/nginx/proxy_host/initproxy.conf) ] + + if [ ! -f /data/nginx/proxy_host/initproxy.conf ] || [ $(stat -c %Y /etc/shadow) -gt $(stat -c %Y /data/nginx/proxy_host/initproxy.conf) ] then cp /etc/initproxy.conf /data/nginx/proxy_host/ echo "Update initproxy.conf to Nginx" else echo "Don't need to update initproxy.conf to Nginx" fi + } nginx_proxy