aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile5
-rwxr-xr-xupdate.sh8
2 files changed, 9 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index a03ee1c..f8925ea 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,4 @@
-.PHONY: all test-local format lint clean help test-remote test-remote-setup test-remote-run test-remote-verify test-remote-teardown setup-user setup-system backup-now backup-now-system check-now check-now-system status status-system snapshots snapshots-system recover uninstall-user uninstall-system update update-gotify update-gotify-user update-gotify-system validate-config logs logs-system config test-update-gotify
+.PHONY: all test-local format lint clean help test-remote test-remote-setup test-remote-run test-remote-verify test-remote-teardown setup-user setup-system backup-now backup-now-system check-now check-now-system status status-system snapshots snapshots-system recover uninstall-user uninstall-system update upgrade update-gotify update-gotify-user update-gotify-system validate-config logs logs-system config test-update-gotify
# Default target
all: test-local
@@ -494,7 +494,8 @@ help:
@echo " uninstall-user : Uninstall user scope DRestic"
@echo " uninstall-system : Uninstall system scope DRestic"
@echo " recover : Show recovery instructions"
- @echo " update : Update DRestic to latest version (auto-detects scope)"
+ @echo " update : Update DRestic scripts and services (auto-detects scope)"
+ @echo " upgrade : Full upgrade including timers (run 'git pull' first)"
@echo " update-gotify : Update Gotify notification settings (auto-detects scope)"
@echo " update-gotify-user : Update Gotify settings for user scope"
@echo " update-gotify-system : Update Gotify settings for system scope"
diff --git a/update.sh b/update.sh
index ab0562d..c6e64c9 100755
--- a/update.sh
+++ b/update.sh
@@ -86,16 +86,20 @@ update_services() {
if [ "$install_type" = "system" ]; then
systemd_dir="/etc/systemd/system"
- log "Updating systemd services in $systemd_dir"
+ log "Updating systemd services and timers in $systemd_dir"
sudo cp systemd/restic-backup.service "$systemd_dir/"
sudo cp systemd/restic-check.service "$systemd_dir/"
+ sudo cp systemd/restic-backup.timer "$systemd_dir/"
+ sudo cp systemd/restic-check.timer "$systemd_dir/"
sudo systemctl daemon-reload
else
systemd_dir="$HOME/.config/systemd/user"
mkdir -p "$systemd_dir"
- log "Updating systemd services in $systemd_dir"
+ log "Updating systemd services and timers in $systemd_dir"
cp systemd/restic-backup.service "$systemd_dir/"
cp systemd/restic-check.service "$systemd_dir/"
+ cp systemd/restic-backup.timer "$systemd_dir/"
+ cp systemd/restic-check.timer "$systemd_dir/"
systemctl --user daemon-reload
fi
}