Files
ignition/notify-shutdown.service
Dustin C. Hatch 11cd8ce8e9 notify-shutdown: Send a message on shutdown
Since Fedora CoreOS machines tend to reboot at seemingly random times
to apply updates, it would be nice to get a notification when they go
down.
2023-09-21 22:34:14 -05:00

39 lines
853 B
Desktop File

[Unit]
Description=Send notification on machine shutdown
RefuseManualStop=yes
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStop=/usr/bin/curl -d '%H is going down' https://ntfy.pyrocufflink.blue/alerts
DynamicUser=yes
CapabilityBoundingSet=
DeviceAllow=
DevicePolicy=closed
LockPersonality=yes
MemoryDenyWriteExecute=yes
NoNewPrivileges=yes
PrivateDevices=yes
PrivateUsers=yes
PrivateTmp=yes
ProcSubset=pid
ProtectClock=yes
ProtectControlGroups=yes
ProtectHome=yes
ProtectHostname=yes
ProtectKernelLogs=yes
ProtectKernelModules=yes
ProtectKernelTunables=yes
ProtectProc=invisible
ProtectSystem=strict
RestrictAddressFamilies=AF_INET AF_INET6
RestrictNamespaces=yes
RestrictRealtime=yes
RestrictSUIDSGID=yes
SystemCallArchitectures=native
SystemCallFilter=@system-service
SystemCallFilter=~@privileged @resources
[Install]
WantedBy=multi-user.target