feat: Add backup and security hardening

This commit is contained in:
2025-11-08 00:28:17 +01:00
parent 8de3f16ee6
commit 96f521a474
23 changed files with 5696 additions and 939 deletions

View File

@@ -0,0 +1,36 @@
#!/sbin/openrc-run
# OpenRC service for backup network trigger
# Monitors NAS availability and triggers backups when detected
name="backup-monitor"
description="Backup network trigger service"
command="/usr/local/bin/backup-trigger"
command_background="yes"
pidfile="/run/${RC_SVCNAME}.pid"
depend() {
need net
use NetworkManager
after NetworkManager
}
start_pre() {
# Ensure command exists
if [ ! -x "$command" ]; then
eerror "Backup trigger script not found: $command"
return 1
fi
# Check config exists
if [ ! -f /etc/backup.conf ]; then
eerror "Backup configuration not found: /etc/backup.conf"
return 1
fi
ebegin "Starting backup monitor"
}
stop_post() {
eend $? "Stopped backup monitor"
}