Skip to content

Commit ed68baf

Browse files
authored
fix(docker): 兼容旧版默认路径 compatibility of old default config path (NewFuture#487)
Update entrypoint.sh
1 parent b6215fb commit ed68baf

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

docker/entrypoint.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,18 @@
22

33
if [ $# -eq 0 ]; then
44
printenv > /etc/environment
5+
if [ -f /config.json ]; then
6+
echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
7+
if [ ! -f /ddns/config.json ]; then
8+
ln -s /config.json /ddns/config.json
9+
echo "WARNING: /ddns/config.json not found. Created symlink to /config.json."
10+
fi
11+
echo "WARNING: From v4.0.0, the working dir is /ddns/"
12+
echo "WARNING: Please map your host folder to /ddns/"
13+
echo "[old] -v /host/folder/config.json:/config.json"
14+
echo "[new] -v /host/folder/:/ddns/"
15+
echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
16+
fi
517
echo "*/5 * * * * cd /ddns && /bin/ddns" > /etc/crontabs/root
618
/bin/ddns && echo "Cron daemon will run every 5 minutes..." && exec crond -f
719
else

0 commit comments

Comments
 (0)