1
0
mirror of https://github.com/osmarks/ngircd.git synced 2024-12-12 01:40:27 +00:00
ngircd/contrib/ngircd.service
Alexander Barton 791778d7b6 Ping the service manager and set a status message
Periodically "ping" the service manager (every 3 seconds) and set a
status message showing connection statistics.

This enables using the systemd(8) watchdog functionality for the
"ngircd.service" unit.
2024-04-06 00:13:13 +02:00

47 lines
1.3 KiB
Desktop File

# ngIRCd systemd service unit.
# See systemd(1), systemd.unit(5), systemd.service(5), systemd.exec(5).
[Unit]
Description=Next Generation IRC Daemon
Documentation=man:ngircd(8) man:ngircd.conf(5) https://ngircd.barton.de
After=network.target
Wants=anope.service atheme.service irc-services.service
Wants=bopm.service hopm.service
Before=anope.service atheme.service irc-services.service
Before=bopm.service hopm.service
[Service]
Type=notify
User=irc
Group=irc
# Settings & limits:
CapabilityBoundingSet=CAP_SYS_CHROOT CAP_NET_BIND_SERVICE
MemoryDenyWriteExecute=yes
NoNewPrivileges=yes
PrivateDevices=yes
PrivateTmp=yes
ProtectControlGroups=yes
ProtectHome=yes
ProtectKernelModules=yes
ProtectKernelTunables=yes
ProtectSystem=full
RestrictAddressFamilies=AF_INET AF_INET6 AF_UNIX
RestrictRealtime=yes
RuntimeDirectory=ircd
RuntimeDirectoryMode=750
# Try to load "default files" from any Debian package variant to keep this
# unit generic.
EnvironmentFile=-/etc/default/ngircd
EnvironmentFile=-/etc/default/ngircd-full
EnvironmentFile=-/etc/default/ngircd-full-dbg
# Start ngIRCd. Note: systemd doesn't allow to use $DAEMON here!
ExecStart=/usr/sbin/ngircd --nodaemon --syslog $PARAMS
ExecReload=/bin/kill -HUP $MAINPID
# Error handling:
# ngIRCd tries to "ping" the service manager every 3 seconds.
WatchdogSec=10
Restart=on-failure
[Install]
WantedBy=multi-user.target