Working script modified for use with working systemd service

This commit is contained in:
2026-01-15 21:25:26 -06:00
parent 87d3cb86c4
commit b6db471b8a
4 changed files with 29 additions and 13 deletions

View File

@@ -59,8 +59,14 @@ setup_backup () {
sudo cp -r borg /opt/
sudo chown -R "root:root" /opt/borg
sudo chmod -R 755 /opt/borg
find /opt/borg -type d -exec sudo chmod 755 {} \;
find /opt/borg -type f -exec sudo chmod 644 {} \;
sudo chmod -R 755 /opt/borg/bin
sudo chmod 700 /opt/borg/etc
sudo chmod 700 /opt/borg/ssh
sudo ln -s /opt/borg/systemd/backup.service /etc/systemd/system/backup.service
sudo ln -s /opt/borg/systemd/backup.timer /etc/systemd/system/backup.timer
sudo systemctl daemon-reload
local escaped_path=$(escape_sed "$repopath")
local escaped_pass=$(escape_sed "$raw_passphrase")
@@ -74,7 +80,7 @@ EOF
printf "Installation complete.\n"
generate_recovery_file "$repopath" "$raw_passphrase"
sudo systemctl enable --now backup.timer
}
setup_encrypted_backup () {