add compatibility with cron changes

This commit is contained in:
aptalca 2023-10-30 17:29:57 -04:00
parent 1337990eec
commit f044bef4aa
No known key found for this signature in database
GPG Key ID: BE36CFFB9FD85548
2 changed files with 2 additions and 3 deletions

View File

@ -1,4 +1,4 @@
#!/usr/bin/with-contenv bash
sed -i '/\/app\/auto-proxy.sh/d' /config/crontabs/root
sed -i '/\/app\/auto-proxy.sh/d' /etc/crontabs/root
rm -rf /etc/nginx/http.d/auto-proxy*.conf /config/nginx/proxy-confs/auto-proxy*.conf

View File

@ -12,8 +12,7 @@ rm -rf /auto-proxy
mkdir /auto-proxy
if ! grep -q "/app/auto-proxy.sh" /config/crontabs/root; then
echo "* * * * * /app/auto-proxy.sh" >> /config/crontabs/root
cp /config/crontabs/root /etc/crontabs/root
echo "* * * * * /app/auto-proxy.sh" >> /etc/crontabs/root
fi
/app/auto-proxy.sh