Debian Codegraph @

debian/freeradius.service

raw
1 [Unit]
2 Description=FreeRADIUS multi-protocol policy server
3 After=network-online.target
4 Documentation=man:radiusd(8) man:radiusd.conf(5) http://wiki.freeradius.org/ http://networkradius.com/doc/
5
6 [Service]
7 Type=notify
8 WatchdogSec=60
9 NotifyAccess=all
10 EnvironmentFile=-/etc/default/freeradius
11
12 # FreeRADIUS can do static evaluation of policy language rules based
13 # on environmental variables which is very useful for doing per-host
14 # customization.
15 # Unfortunately systemd does not allow variable substitutions such
16 # as %H or $(hostname) in the EnvironmentFile.
17 # We provide HOSTNAME here for convenience.
18 Environment=HOSTNAME=%H
19
20 # Limit memory to 2G this is fine for %99.99 of deployments. FreeRADIUS
21 # is not memory hungry, if it's using more than this, then there's probably
22 # a leak somewhere.
23 MemoryMax=2G
24
25 # Ensure the daemon can still write its pidfile after it drops
26 # privileges. Combination of options that work on a variety of
27 # systems. Test very carefully if you alter these lines.
28 RuntimeDirectory=freeradius
29 RuntimeDirectoryMode=0775
30 User=freerad
31 Group=freerad
32
33 ExecStartPre=/usr/sbin/freeradius $FREERADIUS_OPTIONS -Cx -lstdout
34 ExecStart=/usr/sbin/freeradius -f $FREERADIUS_OPTIONS
35 Restart=on-failure
36 RestartSec=5
37 ExecReload=/usr/sbin/freeradius $FREERADIUS_OPTIONS -Cxm -lstdout
38 ExecReload=/bin/kill -HUP $MAINPID
39
40 # Don't elevate privileges after starting
41 NoNewPrivileges=true
42
43 # Allow binding to secure ports, broadcast addresses, and raw interfaces.
44 #AmbientCapabilities=CAP_NET_ADMIN CAP_NET_BIND_SERVICE CAP_NET_BROADCAST CAP_NET_RAW CAP_SETUID CAP_SETGID CAP_CHOWN CAP_DAC_OVERRIDE
45
46 # Private /tmp that isn't shared by other processes
47 PrivateTmp=true
48
49 # cgroups are readable only by radiusd, and child processes
50 ProtectControlGroups=true
51
52 # don't load new kernel modules
53 ProtectKernelModules=true
54
55 # don't tune kernel parameters
56 ProtectKernelTunables=true
57
58 # Only allow native system calls
59 SystemCallArchitectures=native
60
61 # We shouldn't be writing to the configuration directory
62 ReadOnlyDirectories=/etc/freeradius/
63
64 # We can read and write to the log directory.
65 ReadWriteDirectories=/var/log/freeradius/
66
67 [Install]
68 WantedBy=multi-user.target