summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEray Aslan <eras@gentoo.org>2013-01-15 15:01:45 +0000
committerEray Aslan <eras@gentoo.org>2013-01-15 15:01:45 +0000
commitb1deba918c71dad923728d9620d7626f915cf3dc (patch)
treefd3e0cc97537718e77755a8a2d7613e93029eef1 /mail-filter/p3scan/files
parentBugfix release on the 1.8 branch. The fix for bug #440278 is now upstream. (diff)
downloadhistorical-b1deba918c71dad923728d9620d7626f915cf3dc.tar.gz
historical-b1deba918c71dad923728d9620d7626f915cf3dc.tar.bz2
historical-b1deba918c71dad923728d9620d7626f915cf3dc.zip
Create run dir when necessary - bug #452230
Package-Manager: portage-2.2.0_alpha152/cvs/Linux x86_64 Manifest-Sign-Key: 0x77F1F175586A3B1F
Diffstat (limited to 'mail-filter/p3scan/files')
-rw-r--r--mail-filter/p3scan/files/p3scan.init-r135
1 files changed, 35 insertions, 0 deletions
diff --git a/mail-filter/p3scan/files/p3scan.init-r1 b/mail-filter/p3scan/files/p3scan.init-r1
new file mode 100644
index 000000000000..7854c76aaafc
--- /dev/null
+++ b/mail-filter/p3scan/files/p3scan.init-r1
@@ -0,0 +1,35 @@
+#!/sbin/runscript
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/mail-filter/p3scan/files/p3scan.init-r1,v 1.1 2013/01/15 15:01:34 eras Exp $
+
+depend() {
+ use net
+}
+
+checkconfig() {
+ if [[ ! -d /var/run/p3scan ]] ; then
+ checkpath -q -d -m 0700 -o mail:mail /var/run/p3scan || return 1
+ fi
+}
+
+start() {
+ checkconfig || return 1
+ ebegin "Starting p3scan"
+ start-stop-daemon --start --quiet --pidfile /var/run/p3scan/p3scan.pid --exec /usr/sbin/p3scan
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping p3scan"
+ start-stop-daemon --stop --quiet --pidfile /var/run/p3scan/p3scan.pid
+ eend $?
+}
+
+restart() {
+ ebegin "Restarting p3scan"
+ svc_stop
+ sleep 1
+ svc_start
+ eend $?
+}