diff options
author | Henning Schild <henning@hennsch.de> | 2019-03-08 10:16:18 +0100 |
---|---|---|
committer | Thomas Deutschmann <whissi@gentoo.org> | 2019-03-09 22:22:59 +0100 |
commit | f55d8f0f79305fa8d7d89290f6345a907cab46f5 (patch) | |
tree | f419c4284a55d8c89e7a4004de49c147238a2107 /www-apps/radicale | |
parent | www-apps/radicale: fix file permissions for state directory (diff) | |
download | gentoo-f55d8f0f79305fa8d7d89290f6345a907cab46f5.tar.gz gentoo-f55d8f0f79305fa8d7d89290f6345a907cab46f5.tar.bz2 gentoo-f55d8f0f79305fa8d7d89290f6345a907cab46f5.zip |
www-apps/radicale: clean up init script and run with umask
Make sure that files created by the deamon are not world readable,
inspired by the systemd service coming in a later commit.
Suggested-by: Thomas Deutschmann <whissi@gentoo.org>
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-r2.init.d | 27 | ||||
-rw-r--r-- | www-apps/radicale/radicale-2.1.11-r1.ebuild | 2 |
2 files changed, 28 insertions, 1 deletions
diff --git a/www-apps/radicale/files/radicale-r2.init.d b/www-apps/radicale/files/radicale-r2.init.d new file mode 100644 index 000000000000..00f85d29e0e5 --- /dev/null +++ b/www-apps/radicale/files/radicale-r2.init.d @@ -0,0 +1,27 @@ +#!/sbin/openrc-run +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +PIDFILE=/run/radicale.pid + +depend() { + need localmount +} + +start() { + ebegin "Starting radicale" + start-stop-daemon --start --quiet --background \ + --user radicale \ + --umask 0027 \ + --stderr-logger /usr/bin/logger \ + --pidfile ${PIDFILE} --make-pidfile \ + --exec /usr/bin/radicale -- --foreground + eend $? +} + +stop() { + ebegin "Stopping radicale" + start-stop-daemon --stop --quiet \ + --pidfile ${PIDFILE} + eend $? +} diff --git a/www-apps/radicale/radicale-2.1.11-r1.ebuild b/www-apps/radicale/radicale-2.1.11-r1.ebuild index e95f957a111e..cfd37257975e 100644 --- a/www-apps/radicale/radicale-2.1.11-r1.ebuild +++ b/www-apps/radicale/radicale-2.1.11-r1.ebuild @@ -59,7 +59,7 @@ python_install_all() { rm README* || die # init file - newinitd "${FILESDIR}"/radicale-r1.init.d radicale + newinitd "${FILESDIR}"/radicale-r2.init.d radicale # directories keepdir ${RDIR} |