CI / tests (Python 3.10) (pull_request) Successful in 25s
CI / tests (Python 3.11) (pull_request) Successful in 24s
CI / tests (Python 3.12) (pull_request) Successful in 24s
CI / tests (Python 3.13) (pull_request) Successful in 25s
CI / lint (pull_request) Successful in 3s
kernelwatch-backup.service gets OnFailure=kernelwatch-backup-failed.service, which runs notify-backup-failure, so timeouts, OOM kills and crashes are reported as well as handled errors. The installer ships the new unit, and tests check that every OnFailure= target is a real unit. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
41 lines
1.0 KiB
Desktop File
41 lines
1.0 KiB
Desktop File
[Unit]
|
|
Description=Back up the kernelwatch database
|
|
# Any failure, including the timeout, an OOM kill or a crash, sends an ntfy
|
|
# message (a no-op if ntfy isn't configured).
|
|
OnFailure=kernelwatch-backup-failed.service
|
|
|
|
[Service]
|
|
Type=oneshot
|
|
User=kernelwatch
|
|
Group=kernelwatch
|
|
Environment=KERNELWATCH_CONFIG=/etc/kernelwatch/server.toml
|
|
ExecStart=/usr/bin/python3 -I /opt/kernelwatch/kernelwatch-server scheduled-backup
|
|
TimeoutStartSec=10min
|
|
StateDirectory=kernelwatch
|
|
StateDirectoryMode=0750
|
|
|
|
CapabilityBoundingSet=
|
|
AmbientCapabilities=
|
|
NoNewPrivileges=yes
|
|
ProtectSystem=strict
|
|
ProtectHome=yes
|
|
PrivateTmp=yes
|
|
PrivateDevices=yes
|
|
ProtectKernelTunables=yes
|
|
ProtectKernelModules=yes
|
|
ProtectKernelLogs=yes
|
|
ProtectControlGroups=yes
|
|
ProtectClock=yes
|
|
ProtectHostname=yes
|
|
ProtectProc=invisible
|
|
RestrictNamespaces=yes
|
|
RestrictRealtime=yes
|
|
RestrictSUIDSGID=yes
|
|
LockPersonality=yes
|
|
MemoryDenyWriteExecute=yes
|
|
RestrictAddressFamilies=AF_UNIX
|
|
PrivateNetwork=yes
|
|
SystemCallArchitectures=native
|
|
SystemCallFilter=@system-service
|
|
UMask=0077
|