backup-bot-two/entrypoint.sh
Moritz 15275b2571
Some checks failed
continuous-integration/drone/push Build is failing
structured json logging with -m flag
2023-11-23 20:16:15 +01:00

21 lines
468 B
Bash

#!/bin/sh
set -e -o pipefail
apk add --upgrade --no-cache restic bash python3 py3-pip
# Todo use requirements file with specific versions
pip install click==8.1.7 docker==6.1.3 resticpy==1.0.2 python-json-logger==2.0.7
if [ -n "$SSH_HOST_KEY" ]
then
echo "$SSH_HOST_KEY" > /root/.ssh/known_hosts
fi
cron_schedule="${CRON_SCHEDULE:?CRON_SCHEDULE not set}"
echo "$cron_schedule backup --machine-logs create" | crontab -
crontab -l
crond -f -d8 -L /dev/stdout