From 4a3159f69ffa70c07af3076f0dc1c9a6c4fcdb98 Mon Sep 17 00:00:00 2001 From: "Casper V. Kristensen" Date: Tue, 10 May 2022 01:25:49 +0200 Subject: [PATCH] Fix borg setup missing dictionary --- install/borg.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/install/borg.sh b/install/borg.sh index abd8460..44b4b61 100755 --- a/install/borg.sh +++ b/install/borg.sh @@ -4,7 +4,6 @@ set -e # Packages sudo apt update -sudo apt upgrade sudo apt install -y borgbackup # Backup script - not symlinked to avoid potential privilege escalation @@ -14,6 +13,7 @@ sudo chmod 744 /usr/local/sbin/backup.sh # Passphrase if [ ! -f /usr/local/etc/borg/passphrase.key ]; then + sudo mkdir --parents --mode=700 /usr/local/etc/borg/ echo '@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@' echo '@@ PLEASE BACKUP BORG PASSPHRASE: @@' pwgen 32 1 | sudo tee /usr/local/etc/borg/passphrase.key @@ -44,5 +44,4 @@ ssh sigma.caspervk.net -p 222 # sudo adduser --disabled-password borg # sudo su borg # cd ~ -# mkdir repos/ -# chmod 700 repos/ +# mkdir --mode=700 repos/