diff options
author | Omar Vega Ramos <ovruni@gnu.org.pe> | 2013-02-15 15:14:50 -0500 |
---|---|---|
committer | Omar Vega Ramos <ovruni@gnu.org.pe> | 2013-02-15 15:14:50 -0500 |
commit | 3e6467f21d721bd98fa72ec5b842a673f3d60549 (patch) | |
tree | cfb2eccf4c72af1c4b700114026992f6a64194e2 /pcr/tokyotyrant/tokyotyrant.rc | |
parent | 3b2e0940912977aadb95b4b19f7f46c18b6ae93e (diff) | |
download | abslibre-3e6467f21d721bd98fa72ec5b842a673f3d60549.tar.gz abslibre-3e6467f21d721bd98fa72ec5b842a673f3d60549.tar.bz2 abslibre-3e6467f21d721bd98fa72ec5b842a673f3d60549.zip |
Adding strongswan, tokyotyrant to pcr
Diffstat (limited to 'pcr/tokyotyrant/tokyotyrant.rc')
-rw-r--r-- | pcr/tokyotyrant/tokyotyrant.rc | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/pcr/tokyotyrant/tokyotyrant.rc b/pcr/tokyotyrant/tokyotyrant.rc new file mode 100644 index 000000000..eaecb0af0 --- /dev/null +++ b/pcr/tokyotyrant/tokyotyrant.rc @@ -0,0 +1,41 @@ +#!/bin/bash + +# source config +[ -f /etc/conf.d/ttserver ] && . /etc/conf.d/ttserver + +. /etc/rc.conf +. /etc/rc.d/functions + +case "$1" in + start) + stat_busy "Starting TokyoTyrant Server" + /usr/bin/ttserver ${TYRANT_EXTRA_OPTS} -dmn -pid ${TYRANT_PID_FILE} -log ${TYRANT_LOG_FILE} -port ${TYRANT_PORT} ${TYRANT_DB} + if [ $? -gt 0 ]; then + stat_fail + else + add_daemon ttserver + stat_done + fi + ;; + stop) + stat_busy "Stopping TokyoTyrant Server" + if [ -f $TYRANT_PID_FILE ]; then + pid=`cat "$TYRANT_PID_FILE"` + kill -TERM "$pid" + if [ $? -gt 0 ]; then + stat_fail + else + rm_daemon ttserver + stat_done + fi + fi + ;; + restart) + $0 stop + sleep 1 + $0 start + ;; + *) + echo "usage: $0 {start|stop|restart}" +esac +exit 0 |