Files
DDNS/entrypoint.sh
NN708andGitHub 9cfdc14fbb Support environment variables in Docker image (#304)
* feat(docker): add entrypoint.sh

* docs(docker): example using environment variables
2022-03-01 10:54:59 +08:00

15 lines
253 B
Bash
Executable File

#!/bin/sh
if [ $# -eq 0 ]; then
printenv > /etc/environment
echo "*/5 * * * * /ddns -c /config.json" > /etc/crontabs/root
exec crond -f
else
first=`echo $1 | cut -c1`
if [ "$first" = "-" ]; then
exec /ddns $@
else
exec $@
fi
fi