trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zw...@apache.org
Subject svn commit: r918101 - /incubator/trafficserver/traffic/trunk/rc/trafficserver.in
Date Tue, 02 Mar 2010 16:19:28 GMT
Author: zwoop
Date: Tue Mar  2 16:19:28 2010
New Revision: 918101

URL: http://svn.apache.org/viewvc?rev=918101&view=rev
Log:
TS-225: Support for Debian in startup script.
	Review: George P.

Modified:
    incubator/trafficserver/traffic/trunk/rc/trafficserver.in

Modified: incubator/trafficserver/traffic/trunk/rc/trafficserver.in
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/trunk/rc/trafficserver.in?rev=918101&r1=918100&r2=918101&view=diff
==============================================================================
--- incubator/trafficserver/traffic/trunk/rc/trafficserver.in (original)
+++ incubator/trafficserver/traffic/trunk/rc/trafficserver.in Tue Mar  2 16:19:28 2010
@@ -48,7 +48,7 @@
     DISTRIB_ID="redhat" # also exists on Fedora
 elif [ -e /etc/lsb-release ]; then
     DISTRIB_ID="ubuntu"
-elif [ -e /etc/debian-version ]; then
+elif [ -e /etc/debian_version ]; then
     DISTRIB_ID="debian" # also exists on Ubuntu
 elif [ -e /etc/slackware-version ]; then
     DISTRIB_ID="slackware"
@@ -232,14 +232,14 @@
 # main 
 case "$1" in
   start)
-        if [ "$DISTRIB_ID" = "ubuntu" ] ; then
+        if [ "$DISTRIB_ID" = "ubuntu" -o "$DISTRIB_ID" = "debian" ] ; then
 	    [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME"
 	    do_start
 	    case "$?" in
 		0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
 		2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
 	    esac
-        elif [ "$DISTRIB_ID" = "fedora" -o "$DISTRIB_ID" = "redhat" ]; then
+        elif [ "$DISTRIB_ID" = "fedora" ]; then
             action "Starting $prog:" forkdaemon $TC_DAEMON $TC_DAEMON_ARGS
         else
             echo "This script needs to be ported to this OS"
@@ -247,14 +247,14 @@
         fi
 	;;
   stop)
-        if [ "$DISTRIB_ID" = "ubuntu" ] ; then
+        if [ "$DISTRIB_ID" = "ubuntu" -o "$DISTRIB_ID" = "debian" ] ; then
 	    [ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME"
 	    do_stop
 	    case "$?" in
 		0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
 		2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
 	    esac
-        elif [ "$DISTRIB_ID" = "fedora" -o "$DISTRIB_ID" = "redhat" ]; then
+        elif [ "$DISTRIB_ID" = "fedora" ]; then
             action "Stopping $prog:" killproc -p $TC_PIDFILE $TC_DAEMON
             action "Stopping $prog:" killproc -p $TM_PIDFILE $TM_DAEMON
             action "Stopping $prog:" killproc -p $TS_PIDFILE $TS_DAEMON
@@ -273,7 +273,7 @@
 	#log_end_msg $?
 	#;;
   restart|force-reload)
-        if [ "$DISTRIB_ID" = "ubuntu" ] ; then
+        if [ "$DISTRIB_ID" = "ubuntu" -o "$DISTRIB_ID" = "debian" ] ; then
 	#
 	# If the "reload" option is implemented then remove the
 	# 'force-reload' alias
@@ -294,7 +294,7 @@
 		    log_end_msg 1
 		    ;;
 	    esac
-        elif [ "$DISTRIB_ID" = "fedora" -o "$DISTRIB_ID" = "redhat"  ]; then
+        elif [ "$DISTRIB_ID" = "fedora" ]; then
             $0 'stop'
             $0 'start'
         else
@@ -303,7 +303,7 @@
         fi
 	;;
   status)
-        if [ "$DISTRIB_ID" = "fedora" -o "$DISTRIB_ID" = "redhat"]; then
+        if [ "$DISTRIB_ID" = "fedora" ]; then
             status -p $PIDFILE $PROGRAM
         else
             echo "This script needs to be ported to this OS"
@@ -311,7 +311,7 @@
         fi
         ;;
   condrestart)
-        if [ "$DISTRIB_ID" = "fedora" -o "$DISTRIB_ID" = "redhat" ]; then
+        if [ "$DISTRIB_ID" = "fedora" ]; then
             if ! $0 'status'
             then
                 $0 'stop'
@@ -323,11 +323,11 @@
         fi
     ;;
   *)
-        if [ "$DISTRIB_ID" = "ubuntu" ] ; then
+        if [ "$DISTRIB_ID" = "ubuntu" -o "$DISTRIB_ID" = "debian" ] ; then
 	#echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2
 	#echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2
 	    echo "Usage: $SCRIPTNAME {start|stop|restart}" >&2
-        elif [ "$DISTRIB_ID" = "fedora" -o "$DISTRIB_ID" = "redhat" ]; then
+        elif [ "$DISTRIB_ID" = "fedora" ]; then
             echo "Usage: $0 {start|stop|status|restart|condrestart}"
         else
             echo "This script needs to be ported to this OS"



Mime
View raw message