@ -3,23 +3,14 @@
# exit if a command fails
set -e
apk update
# install mysqldump
apk add mysql-client
# install s3 tools
apk add python py-pip
apk add python3 py3-pip
pip install awscli
apk del py-pip
# install go-cron
apk add curl
curl -L --insecure https://github.com/odise/go-cron/releases/download/v0.0.6/go-cron-linux.gz | zcat > /usr/local/bin/go-cron
chmod u+x /usr/local/bin/go-cron
apk del curl
# cleanup
rm -rf /var/cache/apk/*
@ -9,5 +9,6 @@ fi
if [ "${SCHEDULE}" = "**None**" ]; then
sh backup.sh
else
exec go-cron "$SCHEDULE" /bin/sh backup.sh
echo "$SCHEDULE /bin/sh /backup.sh" > /etc/crontabs/root
exec crond -d 8 -f
fi