pld-builder.new: PLD_Builder/request_handler_server (NEW) - shell script fo...
glen
glen at pld-linux.org
Mon Mar 2 11:47:08 CET 2009
Author: glen Date: Mon Mar 2 10:47:08 2009 GMT
Module: pld-builder.new Tag: HEAD
---- Log message:
- shell script for daemon startup
---- Files affected:
pld-builder.new/PLD_Builder:
request_handler_server (NONE -> 1.1) (NEW)
---- Diffs:
================================================================
Index: pld-builder.new/PLD_Builder/request_handler_server
diff -u /dev/null pld-builder.new/PLD_Builder/request_handler_server:1.1
--- /dev/null Mon Mar 2 11:47:08 2009
+++ pld-builder.new/PLD_Builder/request_handler_server Mon Mar 2 11:47:03 2009
@@ -0,0 +1,29 @@
+#!/bin/sh
+sock=$(dirname "$0")/request_handler_server.sock
+daemon=0
+attach=0
+
+if [ x"$1" = x"--daemon" -o x"$1" = x"-d" ]; then
+ daemon=1
+fi
+if [ x"$1" = x"--attach" -o x"$1" = x"-a" ]; then
+ attach=1
+fi
+
+if [ ! -S $sock ]; then
+ daemon=1
+fi
+
+if [ "$daemon" = 1 ]; then
+ cd $(dirname $sock)
+ echo "Starting request_handler_server"
+ rm -f $sock
+ exec dtach -n $(basename $sock) -r none python request_handler_server.py
+ exit 1
+fi
+
+# attach to session
+if [ "$attach" = 1 ]; then
+ echo "Attaching to request_handler_server"
+ exec dtach -a $sock
+fi
================================================================
More information about the pld-cvs-commit
mailing list