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..b7eb2057448f
--- /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
+# $Header: /var/cvsroot/gentoo-x86/net-misc/siproxd/files/siproxd.rc7,v 1.1 2013/03/20 17:19:50 chithanh Exp $
+
+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 $?
+}