From dfd7d9fa5cb11fd8af2da9394a5a5abb3230a4eb Mon Sep 17 00:00:00 2001 From: Sam Scholten Date: Tue, 28 Oct 2025 10:32:59 +1000 Subject: fix: remove hardcoded HOME=/root from systemd templates - Remove hardcoded HOME=/root from systemd service templates - Only set HOME explicitly for system scope in setup.sh and update.sh - This fixes rclone config lookup issue for user installations - Update sed patterns to correctly replace environment variables Resolves issue where user backups failed with rclone permission errors looking for config in /root/.rclone.conf instead of ~/.config/rclone/rclone.conf --- update.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'update.sh') diff --git a/update.sh b/update.sh index 34231eb..c342539 100755 --- a/update.sh +++ b/update.sh @@ -113,10 +113,10 @@ update_services() { # Generate service files with correct paths (like setup.sh does) sed -e "s|ExecStart=/path/to/be/replaced/restic_backup.sh|ExecStart=$install_dir/restic_backup.sh|" \ - -e "s|# Environment variable will be set by setup.sh based on scope|Environment=\"RESTIC_ENV_FILE=$env_file\"|" \ + -e "s|Environment=\"RESTIC_ENV_FILE=/path/to/be/replaced\"|Environment=\"RESTIC_ENV_FILE=$env_file\"|" \ systemd/restic-backup.service >"$systemd_dir/restic-backup.service" sed -e "s|ExecStart=/path/to/be/replaced/restic_check.sh|ExecStart=$install_dir/restic_check.sh|" \ - -e "s|# Environment variable will be set by setup.sh based on scope|Environment=\"RESTIC_ENV_FILE=$env_file\"|" \ + -e "s|Environment=\"RESTIC_ENV_FILE=/path/to/be/replaced\"|Environment=\"RESTIC_ENV_FILE=$env_file\"|" \ systemd/restic-check.service >"$systemd_dir/restic-check.service" # Copy timer files directly -- cgit v1.2.3