• R/O
  • HTTP
  • SSH
  • HTTPS

pysilhouette.git: Commit

メインリポジトリ


Commit MetaInfo

Revision53304a81f7bf463123c31919449a30ca9420de63 (tree)
Time2010-02-03 12:24:22
AuthorKei Funagayama <kei.topaz@gmai...>
CommiterKei Funagayama

Log Message

commited

Change Summary

Incremental Difference

--- /dev/null
+++ b/doc/rc.d/init.d/asynperformerd
@@ -0,0 +1,78 @@
1+#!/bin/bash
2+#
3+# asynperformerd The stop script of the child process(asynperformer.py) of the Pysilhouette system.
4+#
5+# processname: asynperformerd
6+# pidfile: /var/run/asynperformerd
7+# lockfile: /var/lock/subsys/asynperformerd
8+
9+source /etc/rc.d/init.d/functions
10+
11+# Default value
12+prog="asynperformer"
13+progd="asynperformerd"
14+stop_code='2'
15+fifo='/tmp/pysilhouette-asynperformer.fifo'
16+
17+sysconfig="/etc/sysconfig/${progd}"
18+
19+if [ "x${PYTHON}" = "x" ]; then
20+ PYTHON=`which python`
21+fi
22+
23+# Process id file.
24+pidfile="/var/run/${progd}.pid"
25+
26+desc="${progd} (Daemon)"
27+
28+stop() {
29+ echo -n $"Shutting down $desc: "
30+ if [ ! -e ${pidfile} ]; then
31+ echo "not running..."
32+ return 1
33+ fi
34+ pid=`cat ${pidfile}`
35+ if [ "x${pid}" == "x" ]; then
36+ echo "not running... - not pid"
37+ rm -f ${pidfile}
38+ return 1
39+ fi
40+ [ -w "${fifo}" ] && echo -n $stop_code >> ${fifo}
41+ RETVAL=$?
42+ if [ $RETVAL -eq 0 ]; then
43+ success
44+ else
45+ failure
46+ fi
47+ echo
48+ return $RETVAL
49+}
50+
51+err_msg="Please execute \"/etc/rc.d/init.d/silhouetted $1\""
52+
53+case "$1" in
54+ start)
55+ echo ${err_msg}
56+ RETVAL=1
57+ ;;
58+ stop)
59+ stop
60+ ;;
61+ restart|reload)
62+ echo ${err_msg}
63+ RETVAL=1
64+ ;;
65+ condrestart)
66+ echo ${err_msg}
67+ RETVAL=1
68+ ;;
69+ status)
70+ status ${progd}
71+ RETVAL=$?
72+ ;;
73+ *)
74+ echo $"Usage: $0 {stop|status}"
75+ RETVAL=1
76+esac
77+
78+exit $RETVAL
--- /dev/null
+++ b/doc/rc.d/init.d/asynschedulerd
@@ -0,0 +1,77 @@
1+#!/bin/bash
2+#
3+# asynschedulerd The stop script of the child process(asynscheduler.py) of the Pysilhouette system.
4+#
5+# processname: asynschedulerd
6+# pidfile: /var/run/asynschedulerd.pid
7+# lockfile: /var/lock/subsys/asynschedulerd
8+
9+source /etc/rc.d/init.d/functions
10+
11+# Default value
12+prog="asynscheduler"
13+progd="asynschedulerd"
14+
15+sysconfig="/etc/sysconfig/${progd}"
16+
17+if [ "x${PYTHON}" = "x" ]; then
18+ PYTHON=`which python`
19+fi
20+
21+# Process id file.
22+pidfile="/var/run/${progd}.pid"
23+
24+desc="${progd} (Daemon)"
25+
26+stop() {
27+ echo -n $"Shutting down $desc: "
28+ if [ ! -e ${pidfile} ]; then
29+ echo "not running..."
30+ return 1
31+ fi
32+# pid=`cat ${pidfile}`
33+# if [ "x${pid}" == "x" ]; then
34+# echo "not running... - not pid"
35+# rm -f ${pidfile}
36+# return 1
37+# fi
38+ killproc -p ${pidfile} -15
39+# kill ${pid}
40+ RETVAL=$?
41+ if [ $RETVAL -eq 0 ]; then
42+ success
43+ else
44+ failure
45+ fi
46+ echo
47+ return $RETVAL
48+}
49+
50+err_msg="Please execute \"/etc/rc.d/init.d/silhouetted $1\""
51+
52+case "$1" in
53+ start)
54+ echo ${err_msg}
55+ RETVAL=1
56+ ;;
57+ stop)
58+ stop
59+ ;;
60+ restart|reload)
61+ echo ${err_msg}
62+ RETVAL=1
63+ ;;
64+ condrestart)
65+ echo ${err_msg}
66+ RETVAL=1
67+ ;;
68+ status)
69+ status ${progd}
70+ RETVAL=$?
71+ ;;
72+ *)
73+ echo $"Usage: $0 {stop|status}"
74+ RETVAL=1
75+esac
76+
77+exit $RETVAL
Show on old repository browser