summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Turner <mattst88@gentoo.org>2016-11-26 13:47:22 -0800
committerMatt Turner <mattst88@gentoo.org>2016-11-26 14:27:17 -0800
commit4c3aa39b372aab04214d850034ca822071ea6e05 (patch)
tree5cbd017da062adda136147fbb17e6894d5f994e7
parentnet-dialup/freeradius: Run service as radius user by default. (diff)
downloadgentoo-4c3aa39b372aab04214d850034ca822071ea6e05.tar.gz
gentoo-4c3aa39b372aab04214d850034ca822071ea6e05.tar.bz2
gentoo-4c3aa39b372aab04214d850034ca822071ea6e05.zip
net-dialup/freeradius: Add systemd unit files.
Bug: https://bugs.gentoo.org/show_bug.cgi?id=543464
-rw-r--r--net-dialup/freeradius/files/freeradius.service15
-rw-r--r--net-dialup/freeradius/files/freeradius.tmpfiles1
-rw-r--r--net-dialup/freeradius/freeradius-3.0.12-r1.ebuild7
3 files changed, 20 insertions, 3 deletions
diff --git a/net-dialup/freeradius/files/freeradius.service b/net-dialup/freeradius/files/freeradius.service
new file mode 100644
index 00000000000..5304f076119
--- /dev/null
+++ b/net-dialup/freeradius/files/freeradius.service
@@ -0,0 +1,15 @@
+[Unit]
+Description=FreeRADIUS high performance RADIUS server.
+After=syslog.target network.target
+
+[Service]
+Type=simple
+PIDFile=/run/radiusd/radiusd.pid
+ExecStartPre=-/bin/chown -R radius.radius /run/radiusd
+ExecStartPre=/usr/sbin/radiusd -C
+ExecStart=/usr/sbin/radiusd -d /etc/raddb -f
+ExecReload=/usr/sbin/radiusd -C
+ExecReload=/bin/kill -HUP $MAINPID
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-dialup/freeradius/files/freeradius.tmpfiles b/net-dialup/freeradius/files/freeradius.tmpfiles
new file mode 100644
index 00000000000..21620c97706
--- /dev/null
+++ b/net-dialup/freeradius/files/freeradius.tmpfiles
@@ -0,0 +1 @@
+d /run/radiusd 0755 radius radius -
diff --git a/net-dialup/freeradius/freeradius-3.0.12-r1.ebuild b/net-dialup/freeradius/freeradius-3.0.12-r1.ebuild
index f69459b7229..dedda6b4afc 100644
--- a/net-dialup/freeradius/freeradius-3.0.12-r1.ebuild
+++ b/net-dialup/freeradius/freeradius-3.0.12-r1.ebuild
@@ -5,9 +5,7 @@
EAPI=6
PYTHON_COMPAT=( python2_7 )
-inherit autotools eutils pam python-any-r1 user
-
-#PATCHSET=4
+inherit autotools eutils pam python-any-r1 systemd user
MY_P="${PN}-server-${PV}"
@@ -200,6 +198,9 @@ src_install() {
newinitd "${FILESDIR}/radius.init-r3" radiusd
newconfd "${FILESDIR}/radius.conf-r4" radiusd
+ systemd_newtmpfilesd "${FILESDIR}"/freeradius.tmpfiles freeradius.conf
+ systemd_dounit "${FILESDIR}"/freeradius.service
+
prune_libtool_files
}