update cron times, clean up scripts

This commit is contained in:
aptalca 2021-05-03 14:27:50 -04:00
parent c731e5e1d1
commit 4b1e602d9b
7 changed files with 16 additions and 16 deletions

View File

@ -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/ /

View File

@ -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/ /

View File

@ -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/ /

View File

@ -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

View File

@ -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

View File

@ -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

View 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