null+****@clear*****
null+****@clear*****
2010年 9月 13日 (月) 12:19:45 JST
Kouhei Sutou 2010-09-13 03:19:45 +0000 (Mon, 13 Sep 2010) New Revision: ff0713eec2bf345496d1d4e17e794573c33d0f54 Log: support status command. Modified files: debian/groonga.init Modified: debian/groonga.init (+18 -1) =================================================================== --- debian/groonga.init 2010-09-13 03:16:06 +0000 (7deca2e) +++ debian/groonga.init 2010-09-13 03:19:45 +0000 (a928db4) @@ -153,6 +153,20 @@ do_reload() { return 0 } +do_status() { + ARGS="" + if [ -n "${PROTOCOL}" ]; then + ARGS="${ARGS} --protocol ${PROTOCOL}" + fi + if [ -n "${ADDRESS}" ]; then + ARGS="${ARGS} -c ${ADDRESS}" + else + ARGS="${ARGS} -c localhost" + fi + $DAEMON $ARGS status + return $? +} + case "$1" in start) [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME" @@ -193,8 +207,11 @@ case "$1" in ;; esac ;; + status) + do_status + ;; *) - echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2 + echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload|status}" >&2 exit 3 ;; esac