[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [flashproxy/master] Add an init.d script for crossdomaind.py.



commit ce1642b5ce8d75eef949cdefebae396ade02a4e5
Author: David Fifield <david@xxxxxxxxxxxxxxx>
Date:   Mon Sep 5 02:07:50 2011 -0400

    Add an init.d script for crossdomaind.py.
---
 init.d/crossdomaind |   62 +++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 62 insertions(+), 0 deletions(-)

diff --git a/init.d/crossdomaind b/init.d/crossdomaind
new file mode 100755
index 0000000..3aecaaa
--- /dev/null
+++ b/init.d/crossdomaind
@@ -0,0 +1,62 @@
+#!/bin/sh
+#
+# crossdomaind  This shell script takes care of starting and stopping
+#               crossdomaind server.
+#
+# chkconfig: 2345 90 10
+# description: Crossdomain policy server.
+# processname: crossdomaind.py
+# pidfile: /var/flashproxy/crossdomaind.pid
+
+# Installation instructions:
+# cp crossdomaind /etc/init.d/crossdomaind
+# chkconfig --add crossdomaind
+# service crossdomaind start
+
+# Source function library.
+. /etc/rc.d/init.d/functions
+
+BINDIR=/usr/local/bin
+VARDIR=/var/flashproxy
+PROG=$BINDIR/crossdomaind.py
+PIDFILE=$VARDIR/crossdomaind.pid
+
+# See how we were called.
+case "$1" in
+  start)
+	[ -x $PROG ] || exit 1
+	echo -n $"Starting flash proxy crossdomaind: "
+	cd $VARDIR && daemon --pidfile $PIDFILE $PROG --pidfile $PIDFILE --daemon
+	RETVAL=$?
+	echo
+	[ $RETVAL -eq 0 ] && touch /var/lock/subsys/crossdomaind
+	;;
+  stop)
+	# Stop daemon.
+	echo -n $"Shutting down flash proxy crossdomaind: "
+	killproc -p $PIDFILE
+	RETVAL=$?
+	echo
+	if [ $RETVAL -eq 0 ]; then
+		rm -f /var/lock/subsys/crossdomaind
+		rm -f $PIDFILE
+	fi
+	;;
+  status)
+	status -p $PIDFILE crossdomaind
+	RETVAL=$?
+	;;
+  restart|reload)
+	$0 stop
+	$0 start
+	;;
+  condrestart)
+	[ -f /var/lock/subsys/crossdomaind ] && restart || :
+	;;
+  *)
+	echo $"Usage: $0 {start|stop|status|restart}"
+	RETVAL=3
+	;;
+esac
+
+exit $RETVAL



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits