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>
--- /dev/null
+#!/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 $?
+}
rm README* || die
# init file
- newinitd "${FILESDIR}"/radicale-r1.init.d radicale
+ newinitd "${FILESDIR}"/radicale-r2.init.d radicale
# directories
keepdir ${RDIR}