mirror of
https://github.com/linuxserver/docker-duckdns.git
synced 2026-02-20 00:26:29 +08:00
update cron times, clean up scripts
This commit is contained in:
parent
c731e5e1d1
commit
4b1e602d9b
@ -11,9 +11,9 @@ LABEL maintainer="aptalca"
|
||||
ENV S6_BEHAVIOUR_IF_STAGE2_FAILS=2
|
||||
|
||||
RUN \
|
||||
echo "**** install packages ****" && \
|
||||
apk add --no-cache \
|
||||
curl
|
||||
echo "**** install packages ****" && \
|
||||
apk add --no-cache \
|
||||
curl
|
||||
|
||||
# add local files
|
||||
COPY root/ /
|
||||
|
||||
@ -11,9 +11,9 @@ LABEL maintainer="aptalca"
|
||||
ENV S6_BEHAVIOUR_IF_STAGE2_FAILS=2
|
||||
|
||||
RUN \
|
||||
echo "**** install packages ****" && \
|
||||
apk add --no-cache \
|
||||
curl
|
||||
echo "**** install packages ****" && \
|
||||
apk add --no-cache \
|
||||
curl
|
||||
|
||||
# add local files
|
||||
COPY root/ /
|
||||
|
||||
@ -11,9 +11,9 @@ LABEL maintainer="aptalca"
|
||||
ENV S6_BEHAVIOUR_IF_STAGE2_FAILS=2
|
||||
|
||||
RUN \
|
||||
echo "**** install packages ****" && \
|
||||
apk add --no-cache \
|
||||
curl
|
||||
echo "**** install packages ****" && \
|
||||
apk add --no-cache \
|
||||
curl
|
||||
|
||||
# add local files
|
||||
COPY root/ /
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
#!/usr/bin/with-contenv bash
|
||||
|
||||
. /app/duck.conf
|
||||
RESPONSE=`curl -s "https://www.duckdns.org/update?domains=$SUBDOMAINS&token=$TOKEN&ip="`
|
||||
if [ "$RESPONSE" = "OK" ]; then
|
||||
echo "Your IP was updated at "$(date)
|
||||
RESPONSE=$(curl -sSk "https://www.duckdns.org/update?domains=${SUBDOMAINS}&token=${TOKEN}&ip=")
|
||||
if [ "${RESPONSE}" = "OK" ]; then
|
||||
echo "Your IP was updated at $(date)"
|
||||
else
|
||||
echo "Something went wrong, please check your settings "$(date)
|
||||
echo -e "Something went wrong, please check your settings $(date)\nThe response returned was:\n${RESPONSE}"
|
||||
fi
|
||||
|
||||
@ -1 +1 @@
|
||||
*/5 * * * * /app/duck.sh 2>&1 > /config/duck.log
|
||||
2,7,12,17,22,27,32,37,42,47,52,57 * * * * /app/duck.sh 2>&1 > /config/duck.log
|
||||
|
||||
@ -6,7 +6,7 @@ if [ -z "$SUBDOMAINS" ] || [ -z "$TOKEN" ]; then
|
||||
exit 1
|
||||
else
|
||||
echo "Retrieving subdomain and token from the environment variables"
|
||||
echo -e "SUBDOMAINS=$SUBDOMAINS TOKEN=$TOKEN" > /app/duck.conf
|
||||
echo -e "SUBDOMAINS=\"${SUBDOMAINS}\" TOKEN=\"${TOKEN}\"" > /app/duck.conf
|
||||
fi
|
||||
|
||||
# modify crontab if logging to file
|
||||
|
||||
@ -1 +1 @@
|
||||
*/5 * * * * /app/duck.sh 2>&1
|
||||
2,7,12,17,22,27,32,37,42,47,52,57 * * * * /app/duck.sh 2>&1
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user