summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHenning Schild <henning@hennsch.de>2019-03-08 10:21:33 +0100
committerThomas Deutschmann <whissi@gentoo.org>2019-03-09 22:23:00 +0100
commit6da1901a78213ed76f1ae4c5b53e449439bd742f (patch)
tree1dba9318b771269f27e40dd7fc38b5bbc43bed49 /www-apps/radicale
parentwww-apps/radicale: clean up init script and run with umask (diff)
downloadgentoo-6da1901a78213ed76f1ae4c5b53e449439bd742f.tar.gz
gentoo-6da1901a78213ed76f1ae4c5b53e449439bd742f.tar.bz2
gentoo-6da1901a78213ed76f1ae4c5b53e449439bd742f.zip
www-apps/radicale: add systemd service file
Signed-off-by: Henning Schild <henning@hennsch.de> Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
Diffstat (limited to 'www-apps/radicale')
-rw-r--r--www-apps/radicale/files/radicale.service25
-rw-r--r--www-apps/radicale/radicale-2.1.11-r1.ebuild3
2 files changed, 27 insertions, 1 deletions
diff --git a/www-apps/radicale/files/radicale.service b/www-apps/radicale/files/radicale.service
new file mode 100644
index 000000000000..ffafba8d3ae7
--- /dev/null
+++ b/www-apps/radicale/files/radicale.service
@@ -0,0 +1,25 @@
+## this is heavily inspired by https://radicale.org/setup/
+
+[Unit]
+Description=A simple CalDAV (calendar) and CardDAV (contact) server
+After=network.target
+Requires=network.target
+
+[Service]
+ExecStart=/usr/bin/radicale
+Restart=on-failure
+User=radicale
+# Deny other users access to the calendar data
+UMask=0027
+PrivateTmp=true
+ProtectSystem=strict
+ProtectHome=true
+PrivateDevices=true
+ProtectKernelTunables=true
+ProtectKernelModules=true
+ProtectControlGroups=true
+NoNewPrivileges=true
+StateDirectory=radicale
+
+[Install]
+WantedBy=multi-user.target
diff --git a/www-apps/radicale/radicale-2.1.11-r1.ebuild b/www-apps/radicale/radicale-2.1.11-r1.ebuild
index cfd37257975e..853fccb8ac1f 100644
--- a/www-apps/radicale/radicale-2.1.11-r1.ebuild
+++ b/www-apps/radicale/radicale-2.1.11-r1.ebuild
@@ -5,7 +5,7 @@ EAPI="6"
PYTHON_COMPAT=( python{3_4,3_5,3_6} )
-inherit distutils-r1 eutils user
+inherit distutils-r1 eutils user systemd
MY_PN="Radicale"
MY_P="${MY_PN}-${PV}"
@@ -60,6 +60,7 @@ python_install_all() {
# init file
newinitd "${FILESDIR}"/radicale-r2.init.d radicale
+ systemd_dounit "${FILESDIR}/${PN}.service"
# directories
keepdir ${RDIR}