summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'net-misc/siproxd/files/siproxd.rc7')
-rwxr-xr-xnet-misc/siproxd/files/siproxd.rc731
1 files changed, 31 insertions, 0 deletions
diff --git a/net-misc/siproxd/files/siproxd.rc7 b/net-misc/siproxd/files/siproxd.rc7
new file mode 100755
index 000000000000..88ba0331f466
--- /dev/null
+++ b/net-misc/siproxd/files/siproxd.rc7
@@ -0,0 +1,31 @@
+#!/sbin/runscript
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+depend() {
+ need net
+}
+
+check_config() {
+ if [[ ! -f /etc/siproxd.conf ]]; then
+ eerror "Please create /etc/siproxd.conf first!"
+ return 1
+ fi
+ return 0
+}
+
+start() {
+ check_config || return 1
+ checkpath -q -d /var/run/siproxd -o siproxd:siproxd
+ ebegin "Starting siproxd"
+ start-stop-daemon --start --exec /usr/sbin/siproxd -- \
+ -p /var/run/siproxd/siproxd.pid -c /etc/siproxd.conf
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping siproxd"
+ start-stop-daemon --stop --pidfile /var/run/siproxd/siproxd.pid
+ eend $?
+}