mirror of
https://github.com/jung-geun/DynamicDNS-SSL.git
synced 2025-12-19 20:44:40 +09:00
Refactor file paths in Makefile, run_script.sh, and start.sh
This commit is contained in:
1
Makefile
1
Makefile
@@ -1,4 +1,5 @@
|
|||||||
IMAGE_NAME = "cloudflare-ddns"
|
IMAGE_NAME = "cloudflare-ddns"
|
||||||
|
DIR = $(shell pwd)
|
||||||
|
|
||||||
default: build
|
default: build
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,10 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
export CLOUDFLARE_API_KEY=$API_KEY
|
export CLOUDFLARE_API_KEY=$API_KEY
|
||||||
export CLOUDFLARE_DOMAIN=$DOMAIN_NAME
|
export CLOUDFLARE_DOMAIN=$DOMAIN_NAME
|
||||||
export CLOUDFLARE_ZONE_ID=$ZONE_ID
|
export CLOUDFLARE_ZONE_ID=$ZONE_ID
|
||||||
|
|
||||||
|
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||||
|
|
||||||
# Run the script
|
# Run the script
|
||||||
python3 /app/cloudflare-ddns/src/update_dns.py $@
|
python3 $DIR/src/update_dns.py $@
|
||||||
8
start.sh
8
start.sh
@@ -1,8 +1,10 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
if [ ! -f /app/cloudflare-ddns/config/env.json ]; then
|
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||||
cp /app/cloudflare-ddns/init/default_env.json /app/cloudflare-ddns/config/env.json
|
|
||||||
|
if [ ! -f $DIR/config/env.json ]; then
|
||||||
|
cp $DIR/init/default_env.json $DIR/config/env.json
|
||||||
fi
|
fi
|
||||||
|
|
||||||
sh /app/cloudflare-ddns/run_script.sh
|
sh $DIR/run_script.sh
|
||||||
|
|
||||||
# tail -f /var/log/cloudflare_ddns.log
|
# tail -f /var/log/cloudflare_ddns.log
|
||||||
Reference in New Issue
Block a user