summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcin Miroslaw <bug@mejor.pl>2009-12-11 22:34:01 +0000
committerMarcin Miroslaw <bug@mejor.pl>2009-12-11 22:34:01 +0000
commit1c77e0c7f35cd31e7495535139b7904d184b6304 (patch)
treec0329e47f2edd3be82a59f27446ed1466101e594 /mail-filter/gross/files/grossd.initd
parentAdded the license for Nero AAC encoder. (diff)
downloadsunrise-1c77e0c7f35cd31e7495535139b7904d184b6304.tar.gz
sunrise-1c77e0c7f35cd31e7495535139b7904d184b6304.tar.bz2
sunrise-1c77e0c7f35cd31e7495535139b7904d184b6304.zip
mail-filter/gross: Initial commit, bug #247568. Many thanks to Stevan Bajic for base init script,ebuild and information. Thanks to sedzimir and other people from #gentoo-sunrise.
svn path=/sunrise/; revision=9707
Diffstat (limited to 'mail-filter/gross/files/grossd.initd')
-rw-r--r--mail-filter/gross/files/grossd.initd40
1 files changed, 40 insertions, 0 deletions
diff --git a/mail-filter/gross/files/grossd.initd b/mail-filter/gross/files/grossd.initd
new file mode 100644
index 000000000..73df1d165
--- /dev/null
+++ b/mail-filter/gross/files/grossd.initd
@@ -0,0 +1,40 @@
+#!/sbin/runscript
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+depend() {
+ use logger net
+ before mta
+}
+
+checkconfig() {
+ if [ ! -r "${CONF_FILE}" ]
+ then
+ eerror "You need a gross configuration file in ${CONF_FILE}"
+ return 1
+ fi
+ /usr/sbin/grossd -C -f "${CONF_FILE}" >/dev/null 2>&1
+ return
+}
+
+start() {
+ checkconfig || return 1
+ ebegin "Starting ${SVCNAME}"
+ start-stop-daemon \
+ --start \
+ --name grossd \
+ --pid "${GROSS_PID}" \
+ --exec /usr/sbin/grossd -- -P ${GROSS_PID} -f "${CONF_FILE}" ${GROSSD_OPTS}
+ eend ${?} "Failed to start ${SVCNAME}"
+}
+
+stop() {
+ ebegin "Shutting down ${SVCNAME}"
+ start-stop-daemon \
+ --stop \
+ --quiet \
+ --name grossd \
+ --pidfile "${GROSS_PID}"
+ eend ${?} "Failed to stop ${SVCNAME}"
+}