YUKI Hiroshi
null+****@clear*****
Thu Sep 25 12:53:56 JST 2014
YUKI Hiroshi 2014-09-25 12:53:56 +0900 (Thu, 25 Sep 2014) New Revision: 005a20c3c9eb66ec23c976e08d0a2fd3c9f2b784 https://github.com/droonga/droonga-http-server/commit/005a20c3c9eb66ec23c976e08d0a2fd3c9f2b784 Message: Put PID file for CentOS under /run/ Modified files: install.sh install/centos/droonga-http-server Modified: install.sh (+4 -0) =================================================================== --- install.sh 2014-09-25 12:28:58 +0900 (be76a5e) +++ install.sh 2014-09-25 12:53:56 +0900 (53901a6) @@ -290,6 +290,10 @@ prepare_environment_in_centos() { } register_service_in_centos() { + pid_dir=/run/$NAME + mkdir -p $pid_dir + chown -R $USER:$GROUP $pid_dir + install_service_script /etc/rc.d/init.d/$NAME centos /sbin/chkconfig --add $NAME } Modified: install/centos/droonga-http-server (+4 -3) =================================================================== --- install/centos/droonga-http-server 2014-09-25 12:28:58 +0900 (723ce55) +++ install/centos/droonga-http-server 2014-09-25 12:53:56 +0900 (e6c03ee) @@ -13,13 +13,14 @@ USER=$NAME GROUP=droonga DAEMON=/usr/bin/$NAME export DROONGA_BASE_DIR=/home/$NAME/droonga -DAEMON_ARGS="--daemon --pid-file=$NAME" +PIDFILE=/run/$NAME/$NAME.pid +DAEMON_ARGS="--daemon --pid-file=$PIDFILE" [ -x $DAEMON ] || exit 0 start() { echo -n "Starting $NAME: " - daemon --user $USER $DAEMON $DAEMON_ARGS + daemon --user $USER --pidfile $PIDFILE $DAEMON $DAEMON_ARGS RET_CODE=$? touch /var/lock/subsys/$NAME return $RET_CODE @@ -27,7 +28,7 @@ start() { stop() { echo -n "Shutting down $NAME: " - killproc $DAEMON + killproc -p $PIDFILE $DAEMON RET_CODE=$? rm -f /var/lock/subsys/$NAME return $RET_CODE -------------- next part -------------- HTML����������������������������...다운로드