Replace cron suggestion with systemd timer for kiwix updates
User units in systemd/ with an install.sh that symlinks and enables. Persistent=true means missed runs (machine off) catch up on next boot. Logs via journald: journalctl --user -u kiwix-update.service https://claude.ai/code/session_012gDnantBmFTWZGCiKyjazx
This commit is contained in:
Executable
+19
@@ -0,0 +1,19 @@
|
||||
#!/bin/bash
|
||||
# Install kiwix-update systemd user units and enable the timer
|
||||
set -e
|
||||
|
||||
UNIT_DIR="$HOME/.config/systemd/user"
|
||||
SRC="$(cd "$(dirname "$0")" && pwd)"
|
||||
|
||||
mkdir -p "$UNIT_DIR"
|
||||
ln -sf "$SRC/kiwix-update.service" "$UNIT_DIR/kiwix-update.service"
|
||||
ln -sf "$SRC/kiwix-update.timer" "$UNIT_DIR/kiwix-update.timer"
|
||||
|
||||
systemctl --user daemon-reload
|
||||
systemctl --user enable --now kiwix-update.timer
|
||||
|
||||
echo ""
|
||||
systemctl --user list-timers kiwix-update.timer
|
||||
echo ""
|
||||
echo "Run manually anytime: systemctl --user start kiwix-update.service"
|
||||
echo "Logs: journalctl --user -u kiwix-update.service"
|
||||
Reference in New Issue
Block a user