summaryrefslogtreecommitdiffstats
path: root/borgbackup
diff options
context:
space:
mode:
authorSimon Rettberg2018-08-21 12:23:40 +0200
committerSimon Rettberg2018-08-21 12:23:40 +0200
commitb2e3565ce1b13f53b0f303e176020a4f612ee2d2 (patch)
treee0fb8cdee8fae49c529ea596ab9e0772b02ba1f9 /borgbackup
parent[borgbackup] Add script to create repos (diff)
downloadsetup-scripts-b2e3565ce1b13f53b0f303e176020a4f612ee2d2.tar.gz
setup-scripts-b2e3565ce1b13f53b0f303e176020a4f612ee2d2.tar.xz
setup-scripts-b2e3565ce1b13f53b0f303e176020a4f612ee2d2.zip
[borg] Fix cronjob: PATH was missing
Diffstat (limited to 'borgbackup')
-rwxr-xr-xborgbackup/create-repo3
1 files changed, 3 insertions, 0 deletions
diff --git a/borgbackup/create-repo b/borgbackup/create-repo
index 79a4c65..6a6c7dd 100755
--- a/borgbackup/create-repo
+++ b/borgbackup/create-repo
@@ -78,6 +78,9 @@ SCRIPT
chmod 0700 "/opt/scripts/borg-backup.sh"
echo "Dumping cron-job...."
cat > /etc/cron.d/borg-backup <<BLUB
+SHELL=/bin/sh
+PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
+
$(( RANDOM % 60 )) $(( RANDOM % 5 )) * * * root /opt/scripts/borg-backup.sh
BLUB
echo "Downloading borg 1.1.7....."