mirror of
https://github.com/jung-geun/DynamicDNS-SSL.git
synced 2025-12-19 20:44:40 +09:00
Refactor file paths and update cronjob for Cloudflare DDNS
This commit is contained in:
@@ -1 +1 @@
|
||||
*/30 * * * * root /app/cloudflare-ddns/run_script.sh
|
||||
*/30 * * * * root /app/cloudflare-ddns/scripts/run_script.sh
|
||||
|
||||
@@ -9,12 +9,17 @@ sudo apt install -y certbot python3-certbot-dns-cloudflare jq
|
||||
sudo mkdir -p /app/cloudflare-ddns
|
||||
sudo cp -r $DIR/../* /app/cloudflare-ddns
|
||||
if [ -f /app/cloudflare-ddns/config/env.json ]; then
|
||||
echo "Environment configuration file already exists. Back up the existing file and create a new file."
|
||||
read -p "Environment configuration file already exists. Do you want to overwrite it? (y/n): " overwrite
|
||||
if [ "$overwrite" == "y" ]; then
|
||||
sudo mv /app/cloudflare-ddns/config/env.json /app/cloudflare-ddns/config/env.json.bak
|
||||
sudo cp $DIR/../config/env_example.json /app/cloudflare-ddns/config/env.json
|
||||
sudo chmod 600 /app/cloudflare-ddns/config/env.json
|
||||
fi
|
||||
else
|
||||
sudo mkdir -p /app/cloudflare-ddns/config
|
||||
sudo cp $DIR/../config/env_example.json /app/cloudflare-ddns/config/env.json
|
||||
sudo chmod 600 /app/cloudflare-ddns/config/env.json
|
||||
fi
|
||||
sudo mkdir -p /app/cloudflare-ddns/config
|
||||
sudo cp $DIR/../config/env_example.json /app/cloudflare-ddns/config/env.json
|
||||
sudo chmod 600 /app/cloudflare-ddns/config/env.json
|
||||
sudo cp $DIR/../cron/cronjob-ddns /etc/cron.d/cloudflare-ddns
|
||||
echo "Please modify the environment configuration file and save it in the /app/cloudflare-ddns/config/env.json path."
|
||||
|
||||
|
||||
Reference in New Issue
Block a user