This commit is contained in:
Darren 2023-10-25 16:04:56 +08:00 committed by GitHub
parent 2e9b6c1634
commit 0324633611
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View File

@ -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 Dockerfile: https://github.com/NginxProxyManager/nginx-proxy-manager/blob/develop/docker/Dockerfile
# from image: https://hub.docker.com/r/jc21/nginx-proxy-manager # from image: https://hub.docker.com/r/jc21/nginx-proxy-manager

View File

@ -3,13 +3,15 @@
set +e set +e
nginx_proxy(){ 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 then
cp /etc/initproxy.conf /data/nginx/proxy_host/ cp /etc/initproxy.conf /data/nginx/proxy_host/
echo "Update initproxy.conf to Nginx" echo "Update initproxy.conf to Nginx"
else else
echo "Don't need to update initproxy.conf to Nginx" echo "Don't need to update initproxy.conf to Nginx"
fi fi
} }
nginx_proxy nginx_proxy