Compare commits
No commits in common. "e237eb678b0dfd621cdbe232dea4aa2934d9cfac" and "506912ff09e48dbcae9222041348d54b75894512" have entirely different histories.
e237eb678b
...
506912ff09
1 changed files with 0 additions and 33 deletions
|
|
@ -217,36 +217,3 @@ UNIT
|
||||||
systemctl --user daemon-reload
|
systemctl --user daemon-reload
|
||||||
systemctl --user enable --now hiy-update.timer
|
systemctl --user enable --now hiy-update.timer
|
||||||
echo "[hiy] Auto-update timer installed: systemctl --user status hiy-update.timer"
|
echo "[hiy] Auto-update timer installed: systemctl --user status hiy-update.timer"
|
||||||
|
|
||||||
# ── Install systemd timer for daily backup ────────────────────────────────────
|
|
||||||
BACKUP_SERVICE="$SERVICE_DIR/hiy-backup.service"
|
|
||||||
BACKUP_TIMER="$SERVICE_DIR/hiy-backup.timer"
|
|
||||||
|
|
||||||
cat > "$BACKUP_SERVICE" <<UNIT
|
|
||||||
[Unit]
|
|
||||||
Description=HIY daily backup
|
|
||||||
|
|
||||||
[Service]
|
|
||||||
Type=oneshot
|
|
||||||
Environment=PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/$(id -un)/.local/bin
|
|
||||||
ExecStart=${SCRIPT_DIR}/backup.sh
|
|
||||||
StandardOutput=journal
|
|
||||||
StandardError=journal
|
|
||||||
UNIT
|
|
||||||
|
|
||||||
cat > "$BACKUP_TIMER" <<UNIT
|
|
||||||
[Unit]
|
|
||||||
Description=HIY daily backup at 03:00
|
|
||||||
|
|
||||||
[Timer]
|
|
||||||
OnCalendar=*-*-* 03:00:00
|
|
||||||
Persistent=true
|
|
||||||
Unit=hiy-backup.service
|
|
||||||
|
|
||||||
[Install]
|
|
||||||
WantedBy=timers.target
|
|
||||||
UNIT
|
|
||||||
|
|
||||||
systemctl --user daemon-reload
|
|
||||||
systemctl --user enable --now hiy-backup.timer
|
|
||||||
echo "[hiy] Backup timer installed: systemctl --user status hiy-backup.timer"
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue