morphit/ops/systemd/morphit-systemd-monitor.service

42 lines
1.1 KiB
Desktop File

[Unit]
Description=Morphit systemd unit-health monitor
Documentation=https://git.agorise.net/agorise/morphit
After=network-online.target
[Service]
Type=oneshot
# `systemctl show` reads /run/systemd/system; needs minimal
# privilege. Running as root is the conservative default;
# capabilities stripped below.
User=root
Group=root
EnvironmentFile=-/etc/morphit/systemd-monitor.env
ExecStart=/opt/morphit/ops/scripts/morphit-systemd-monitor.sh
# ─── Hardening ─────────────────────────────────────────────────
ProtectSystem=strict
ProtectHome=true
PrivateTmp=true
NoNewPrivileges=true
ProtectKernelTunables=true
ProtectKernelModules=true
ProtectKernelLogs=true
ProtectControlGroups=true
ProtectClock=true
RestrictRealtime=true
RestrictSUIDSGID=true
LockPersonality=true
MemoryDenyWriteExecute=true
LimitCORE=0
PrivateNetwork=true
RestrictAddressFamilies=AF_UNIX
CapabilityBoundingSet=
AmbientCapabilities=
SystemCallFilter=@system-service
SystemCallFilter=~@privileged @resources
[Install]
WantedBy=multi-user.target