aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Scholten2025-10-24 09:01:44 +1000
committerSam Scholten2025-10-24 09:01:44 +1000
commitd8dec8bbb471dfca9fe0535edc0c2906c7f91740 (patch)
tree13fa02e71d88ca8e08e6306ce8c53e7c3b432ef0
parent59af76dc28655316c5176c9262bf05f757dc9f56 (diff)
downloaddrestic-d8dec8bbb471dfca9fe0535edc0c2906c7f91740.tar.gz
drestic-d8dec8bbb471dfca9fe0535edc0c2906c7f91740.zip
Fix systemd service path replacement in setup.sh
The sed commands were using 'ExecStart=.*' which didn't match the exact placeholder path '/path/to/be/replaced/restic_backup.sh'. Updated to use the full path pattern for both backup and check services.
-rwxr-xr-xsetup.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/setup.sh b/setup.sh
index 7da38a2..3650ef6 100755
--- a/setup.sh
+++ b/setup.sh
@@ -342,11 +342,11 @@ chmod +x "$INSTALL_DIR/restic_backup.sh" "$INSTALL_DIR/restic_check.sh" "$INSTAL
# Prepare systemd service files
# Use sed to replace the ExecStart path and add the environment variable
log "Generating systemd service file: $SYSTEMD_DIR/restic-backup.service"
-sed -e "s|ExecStart=.*|ExecStart=$INSTALL_DIR/restic_backup.sh|" \
+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\"|" \
systemd/restic-backup.service >"$SYSTEMD_DIR/restic-backup.service"
log "Generating systemd service file: $SYSTEMD_DIR/restic-check.service"
-sed -e "s|ExecStart=.*|ExecStart=$INSTALL_DIR/restic_check.sh|" \
+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\"|" \
systemd/restic-check.service >"$SYSTEMD_DIR/restic-check.service"