Repository: trafficserver Updated Branches: refs/heads/master 4f369f711 -> 4ecfe2ddf
TS-2562: improve init script support for Debian/Ubuntu Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/4ecfe2dd Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/4ecfe2dd Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/4ecfe2dd Branch: refs/heads/master Commit: 4ecfe2ddf6db0ad74179f54eb0e3da82177ec088 Parents: 4f369f7 Author: Tomasz Kuzemko <[email protected]> Authored: Wed Apr 23 09:41:12 2014 -0700 Committer: James Peach <[email protected]> Committed: Wed Apr 23 09:41:31 2014 -0700 ---------------------------------------------------------------------- CHANGES | 3 +++ rc/trafficserver.in | 18 ++++++++++-------- 2 files changed, 13 insertions(+), 8 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/4ecfe2dd/CHANGES ---------------------------------------------------------------------- diff --git a/CHANGES b/CHANGES index c5e21f9..42a6630 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,9 @@ -*- coding: utf-8 -*- Changes with Apache Traffic Server 5.0.0 + *) [TS-2562] Improve init script support for Debian/Ubuntu. + Author: Tomasz Kuzemko <[email protected]> + *) [TS-2735] Align all memory during freelist allocations. *) [TS-2120] remove stale_while_revalidate plugin. http://git-wip-us.apache.org/repos/asf/trafficserver/blob/4ecfe2dd/rc/trafficserver.in ---------------------------------------------------------------------- diff --git a/rc/trafficserver.in b/rc/trafficserver.in index 8c2672e..5f0c5f7 100644 --- a/rc/trafficserver.in +++ b/rc/trafficserver.in @@ -265,11 +265,11 @@ do_stop() case "$1" in start) if [ "$DISTRIB_ID" = "ubuntu" -o "$DISTRIB_ID" = "debian" ] ; then - test "x$VERBOSE" != "xno" && log_daemon_msg "Starting $DESC" "$NAME" + test "x$VERBOSE" != "xno" && log_daemon_msg "Starting ${TS_PACKAGE_NAME}" "$NAME" retval=0 do_start test "$?" -ne 0 -a "$?" -ne 1 && retval=1 - test "x$VERBOSE" != "xno" && log_daemon_msg "$retval" + test "x$VERBOSE" != "xno" && log_end_msg "$retval" exit "$retval" elif [ "$DISTRIB_ID" = "fedora" -o "$DISTRIB_ID" = "redhat" ]; then action "Starting ${TS_PACKAGE_NAME}:" forkdaemon $TC_DAEMON $TC_DAEMON_ARGS @@ -295,11 +295,11 @@ case "$1" in ;; stop) if [ "$DISTRIB_ID" = "ubuntu" -o "$DISTRIB_ID" = "debian" ] ; then - test "x$VERBOSE" != "xno" && log_daemon_msg "Stopping $DESC" "$NAME" + test "x$VERBOSE" != "xno" && log_daemon_msg "Stopping ${TS_PACKAGE_NAME}" "$NAME" retval=0 do_stop test "$?" -ne 0 -a "$?" -ne 1 && retval=1 - test "x$VERBOSE" != "xno" && log_daemon_msg "$retval" + test "x$VERBOSE" != "xno" && log_end_msg "$retval" exit "$retval" elif [ "$DISTRIB_ID" = "fedora" -o "$DISTRIB_ID" = "redhat" ]; then action "Stopping ${TC_NAME}:" killproc -p $TC_PIDFILE $TC_DAEMON @@ -344,11 +344,11 @@ case "$1" in ;; reload|force-reload) if [ "$DISTRIB_ID" = "ubuntu" -o "$DISTRIB_ID" = "debian" ] ; then - test "x$VERBOSE" != "xno" && log_daemon_msg "Reloading ${NAME}:" + test "x$VERBOSE" != "xno" && log_daemon_msg "Reloading ${TS_PACKAGE_NAME}" "$NAME" retval=0 $TL_BINARY -x test "$?" -ne 0 -a "$?" -ne 1 && retval=1 - test "x$VERBOSE" != "xno" && log_daemon_msg "$retval" + test "x$VERBOSE" != "xno" && log_end_msg "$retval" exit "$retval" elif [ "$DISTRIB_ID" = "fedora" -o "$DISTRIB_ID" = "redhat" ]; then action "Reloading ${NAME}:" $TL_BINARY -x @@ -373,7 +373,7 @@ case "$1" in # If the "reload" option is implemented then remove the # 'force-reload' alias # - log_daemon_msg "Restarting $DESC" "$NAME" + log_daemon_msg "Restarting ${TS_PACKAGE_NAME}" "$NAME" do_stop case "$?" in 0|1) @@ -400,6 +400,8 @@ case "$1" in status) if [ "$DISTRIB_ID" = "fedora" -o "$DISTRIB_ID" = "redhat" ]; then status -p $TC_PIDFILE $TC_NAME + elif [ "$DISTRIB_ID" = "ubuntu" -o "$DISTRIB_ID" = "debian" ] ; then + status_of_proc "$TC_DAEMON" "$TC_NAME" -p "$TC_PIDFILE" && exit 0 || exit $? elif [ "$DISTRIB_ID" = "suse" ]; then echo -n "Checking for service ${DM}: " checkproc -p $TC_PIDFILE $TC_NAME @@ -443,7 +445,7 @@ case "$1" in ;; *) if [ "$DISTRIB_ID" = "ubuntu" -o "$DISTRIB_ID" = "debian" ] ; then - echo "Usage: $SCRIPTNAME {start|stop|restart}" >&2 + echo "Usage: $SCRIPTNAME {start|stop|status|restart}" >&2 elif [ "$DISTRIB_ID" = "fedora" -o "$DISTRIB_ID" = "redhat" ]; then echo "Usage: $0 {start|stop|status|restart|condrestart}" elif [ "$DISTRIB_ID" = "suse" ]; then
