long-long-float
null+****@clear*****
Thu Sep 4 16:58:31 JST 2014
long-long-float 2014-09-04 16:58:31 +0900 (Thu, 04 Sep 2014) New Revision: 6671fe5a63dfd5c2010c26eac9b9b34dcd52f1ff https://github.com/long-long-float/droonga-engine/commit/6671fe5a63dfd5c2010c26eac9b9b34dcd52f1ff Merged bfeec12: Merge pull request #24 from long-long-float/install-script-for-centos Message: Add service script for CentOS Added files: script/centos/droonga-engine Added: script/centos/droonga-engine (+53 -0) 100644 =================================================================== --- /dev/null +++ script/centos/droonga-engine 2014-09-04 16:58:31 +0900 (10f964c) @@ -0,0 +1,53 @@ +#!/bin/bash +# +# /etc/rc.d/init.d/droonga-engine +# +# <Droonga engine is a core component in Droonga system> +# chkconfig: 2345 20 80 + +# Source function library. +. /etc/init.d/functions + +NAME=droonga-engine +DAEMON=/usr/local/bin/$NAME +export DROONGA_BASE_DIR=/home/$NAME/droonga +DAEMON_ARGS="--pid-file=$NAME" + +[ -x $DAEMON ] || exit 0 + +start() { + echo -n "Starting $NAME: " + daemon $DAEMON $DAEMON_ARGS + RET_CODE=$? + touch /var/lock/subsys/$NAME + return $RET_CODE +} + +stop() { + echo -n "Shutting down $NAME: " + killproc $DAEMON + RET_CODE=$? + rm -f /var/lock/subsys/$NAME + return $RET_CODE +} + +case "$1" in + start) + start + ;; + stop) + stop + ;; + status) + status $NAME + ;; + restart) + stop + start + ;; + *) + echo "Usage: $NAME {start|stop|status|reload|restart[|probe]" + exit 1 + ;; +esac +exit $? -------------- next part -------------- HTML����������������������������... Download