]> code.delx.au - monosys/blobdiff - borg/do-install
zfs: snapshot backup with borg
[monosys] / borg / do-install
index dd0eeb9dbfcd3cc20581facb40526f8d207e266a..bbdf7a4ab90262b57554ce48c8f0d56a38acb24d 100755 (executable)
@@ -4,9 +4,13 @@ set -eux
 
 cd "$(dirname "$0")"
 
-BORG_PASSPHRASE="$(dd if=/dev/urandom of=/dev/stdout bs=1 count=15 2>/dev/null | base64)"
+install -m 0755 backup /usr/local/bin/
+
+if [ "${1:-}" != "full" ]; then
+    exit 0
+fi
 
-install -m 0755 bsnap backup /usr/local/bin/
+BORG_PASSPHRASE="$(dd if=/dev/urandom of=/dev/stdout bs=1 count=15 2>/dev/null | base64)"
 install -m 0644 -T etc-borg-exclude /etc/borg-exclude
 install -m 0600 -T etc-borg-env /etc/borg-env
 sed -i "s|SECRET|$BORG_PASSPHRASE|" /etc/borg-env