From f91962a5a46e683e2276c5b56fc768cb32e70b9a Mon Sep 17 00:00:00 2001 From: René 'Necoro' Neumann Date: Tue, 3 Aug 2010 23:55:36 +0200 Subject: Added init script for radicale --- .../radicale/files/radicale-0.3-foreground.patch | 14 ++++++++++++ app-office/radicale/files/radicale.init.d | 26 ++++++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 app-office/radicale/files/radicale-0.3-foreground.patch create mode 100644 app-office/radicale/files/radicale.init.d (limited to 'app-office/radicale/files') diff --git a/app-office/radicale/files/radicale-0.3-foreground.patch b/app-office/radicale/files/radicale-0.3-foreground.patch new file mode 100644 index 0000000..4f1c911 --- /dev/null +++ b/app-office/radicale/files/radicale-0.3-foreground.patch @@ -0,0 +1,14 @@ +diff --git a/radicale.py b/radicale.py +index a0018df..7fc388a 100755 +--- a/radicale.py ++++ b/radicale.py +@@ -52,6 +52,9 @@ parser.add_option( + default=radicale.config.getboolean("server", "daemon"), + help="launch as daemon") + parser.add_option( ++ "-f", "--foreground", action="store_false", dest="daemon", ++ help="launch in foreground (opposite of --daemon)") ++parser.add_option( + "-H", "--host", + default=radicale.config.get("server", "host"), + help="set server hostname") diff --git a/app-office/radicale/files/radicale.init.d b/app-office/radicale/files/radicale.init.d new file mode 100644 index 0000000..53beabb --- /dev/null +++ b/app-office/radicale/files/radicale.init.d @@ -0,0 +1,26 @@ +#!/sbin/runscript +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +PIDFILE=/var/run/radicale.pid + +depend() { + use net + need localmount +} + +start() { + ebegin "Starting radicale" + start-stop-daemon --start --quiet --background \ + --pidfile ${PIDFILE} --make-pidfile \ + --exec /usr/bin/radicale -- --foreground + eend $? +} + +stop() { + ebegin "Stopping radicale" + start-stop-daemon --stop --quiet \ + --pidfile ${PIDFILE} + eend $? +} -- cgit v1.2.3-70-g09d2