From: Henning Schild Date: Fri, 8 Mar 2019 09:16:18 +0000 (+0100) Subject: www-apps/radicale: clean up init script and run with umask X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=f55d8f0f79305fa8d7d89290f6345a907cab46f5;p=gentoo.git 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 Signed-off-by: Henning Schild Signed-off-by: Thomas Deutschmann --- 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}