-
Notifications
You must be signed in to change notification settings - Fork 12
/
sample.init.systemd
41 lines (38 loc) · 1.25 KB
/
sample.init.systemd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# This is a simple, bare-bones example of a systemd-style init script for INN.
[Unit]
Description=InterNetNews News Server
Documentation=https://www.eyrie.org/~eagle/software/inn/
After=network-online.target
Wants=network-online.target
ConditionPathExists=/etc/news/inn.conf
[Service]
Type=notify
Restart=on-abort
ExecStart=/usr/lib/news/bin/rc.news
ExecReload=/usr/sbin/ctlinnd -t 20 reload '' 'systemd unit reload'
ExecStop=/usr/lib/news/bin/rc.news stop
PIDFile=/run/news/innd.pid
User=news
Group=news
AmbientCapabilities=CAP_NET_BIND_SERVICE
PrivateTmp=true
ProtectControlGroups=true
ProtectHome=true
ProtectSystem=full
RuntimeDirectory=news
LimitNOFILE=infinity
ReadWritePaths=/var/spool/news/
# Setting NoNewPrivileges will break most local sendmail implementations
# because they're setuid or setgid to drop off mail in the mail queue. With
# this configuration, one can use mSMTP as the configured mta, set to forward
# mail via SMTP to localhost. Nevertheless, one can probably do better than
# this by adding some syscall filtering.
#NoNewPrivileges=true
#
# These directives automatically enable NoNewPrivileges, and are therefore
# incompatible:
#PrivateDevices=true
#ProtectKernelModules=true
#ProtectKernelTunables=true
[Install]
WantedBy=multi-user.target