インストール・更新

nginx + diary

起動スクリプト

#!/bin/bash
#
# chkconfig: - 86 14
# description: adiary is Japanese CMS\
#
NAME=adiary
DAEMON=/path/to/adiary.fcgi
DAEMON_ARGS=127.0.0.1:8998
PIDFILE=/var/run/$NAME.pid

start() {
	start-stop-daemon --start --background --make-pidfile --pidfile $PIDFILE --exec $DAEMON -- $DAEMON_ARGS
	result=$?
	if [ $result != "0" ]
	then
		pid=`cat $PIDFILE`
		echo "daemon is already running. (pid=${pid})"
		exit 1
	fi
	return $result
}

stop() {
	start-stop-daemon --stop --quiet --pidfile $PIDFILE
	result=$?
	if [ $result != "0" ]
	then
		echo "daemon is not running. (check $PIDFILE)."
		exit 1
	fi
	rm -f $PIDFILE
	return $result
}

restart() {
	stop
	start
}

case "$1" in
  start)
  	start
	;;
  stop)
  	stop
	;;
  restart)
  	restart
	;;
  *)
	echo $"Usage: $0 {start|stop|reload}"
	exit 1
esac

トップ   新規 一覧 単語検索 最終更新   ヘルプ   最終更新のRSS