Initial commit; base scripting and systemd user event code for borg based backup

This commit is contained in:
2026-07-10 12:20:13 +02:00
commit ffe3c354be
12 changed files with 984 additions and 0 deletions
+16
View File
@@ -0,0 +1,16 @@
#!/usr/bin/env bash
set -Eeuo pipefail
APP_NAME="nextcloud-borg-backup"
BIN_DIR="${HOME}/.local/bin"
SYSTEMD_USER_DIR="${XDG_CONFIG_HOME:-${HOME}/.config}/systemd/user"
systemctl --user disable --now "${APP_NAME}.timer" 2>/dev/null || true
systemctl --user daemon-reload
rm -f "${SYSTEMD_USER_DIR}/${APP_NAME}.service" "${SYSTEMD_USER_DIR}/${APP_NAME}.timer"
rm -f "${BIN_DIR}/${APP_NAME}"
systemctl --user daemon-reload
printf 'Removed user service, timer, and executable.\n'
printf 'Kept config, passphrase, logs, restore directory, and Borg repository.\n'