summaryrefslogtreecommitdiff
path: root/packages/p3scan/files/p3scan.init
diff options
context:
space:
mode:
authorJamie Lenehan <lenehan@twibble.org>2006-10-13 07:54:54 +0000
committerJamie Lenehan <lenehan@twibble.org>2006-10-13 07:54:54 +0000
commited73ca098e3c44c6a08604500876552ffd023b47 (patch)
treef5cb2bd9413f902ede7be99ef0c9b5fb1cba07db /packages/p3scan/files/p3scan.init
parent2de2711091ecf78d37a4dbf7abd2ac912bdd744b (diff)
p3scan 2.9.05d: Add p3scan, a transparent proxy for POP3, POP3S and SMTP
with virus scanning support. Default configuration uses clamav directly via libclamav.
Diffstat (limited to 'packages/p3scan/files/p3scan.init')
-rw-r--r--packages/p3scan/files/p3scan.init33
1 files changed, 33 insertions, 0 deletions
diff --git a/packages/p3scan/files/p3scan.init b/packages/p3scan/files/p3scan.init
new file mode 100644
index 0000000000..9f3865b8b2
--- /dev/null
+++ b/packages/p3scan/files/p3scan.init
@@ -0,0 +1,33 @@
+#!/bin/sh
+DAEMON=/usr/sbin/p3scan
+P3SCAN_CONFIG=/etc/p3scan/p3scan.conf
+PIDFILE=/var/run/p3scan/p3scan.pid
+NAME="p3scan"
+DESC="P3SCAN"
+
+test -r /etc/default/p3scan && . /etc/default/p3scan
+test -x "$DAEMON" || exit 0
+test ! -r "$P3SCAN_CONFIG" && exit 0
+
+case "$1" in
+ start)
+ echo "Starting $DESC: "
+ start-stop-daemon --oknodo -S -x $DAEMON -- -c $P3SCAN_CONFIG
+ echo "$NAME."
+ ;;
+
+ stop)
+ echo "Stopping $DESC:"
+ start-stop-daemon -K -p $PIDFILE
+ ;;
+
+ restart)
+ $0 stop >/dev/null 2>&1
+ $0 start
+ ;;
+
+ *)
+ echo "Usage: $0 {start|stop|restart}"
+ exit 0
+ ;;
+esac