Allow restic to be run from outside

This commit is contained in:
2026-04-19 23:12:19 +02:00
parent c7d46d7186
commit 2d62c94031
2 changed files with 88 additions and 86 deletions
+2 -6
View File
@@ -30,13 +30,9 @@ if [ -d /crontabs ] ; then
for f in /crontabs/* ; do
crontab -u $(basename $f) $f
done
else
elif [[ "$BACKUP_CRONTAB" ]] ; then
echo "# This crontab is generated by the entrypoint script, do not edit" > /tmp/crontab
if [[ "$BACKUP_CRONTAB" ]] ; then
echo -n "$BACKUP_CRONTAB" >> /tmp/crontab
else
echo -n "0 4 * * *" >> /tmp/crontab
fi
echo -n "$BACKUP_CRONTAB" >> /tmp/crontab
if [[ "$HC_PING_KEY" ]] ; then
echo -n " runitor -slug ${HOSTNAME}-restic-backup --" >> /tmp/crontab
fi