--- trafficserver-9.1.2.orig/rc/trafficserver.in +++ trafficserver-9.1.2/rc/trafficserver.in @@ -62,6 +62,8 @@ DISTRIB_ID="debian" # also exists on Ubuntu elif [ -e /etc/slackware-version ]; then DISTRIB_ID="slackware" +elif [ -e /etc/alpine-release ]; then + DISTRIB_ID="alpine" elif [ "$UNAME_S" = "Darwin" ]; then DISTRIB_ID="Darwin" elif [ "$UNAME_S" = "FreeBSD" ]; then @@ -311,7 +313,7 @@ test "$?" -ne 0 -a "$?" -ne 1 && retval=1 test "x$VERBOSE" != "xno" && log_end_msg "$retval" exit "$retval" - elif [ "$DISTRIB_ID" = "gentoo" ]; then + elif [ "$DISTRIB_ID" = "gentoo" -o "$DISTRIB_ID" = "alpine" ]; then ebegin "Starting ${TS_PACKAGE_NAME}" do_start eend $? @@ -348,7 +350,7 @@ elif [ "$DISTRIB_ID" = "fedora" -o "$DISTRIB_ID" = "redhat" ]; then action "Stopping ${TM_NAME}:" killproc -p $TM_PIDFILE -d 35 $TM_DAEMON action "Stopping ${TS_NAME}:" killproc -p $TS_PIDFILE -d 35 $TS_DAEMON - elif [ "$DISTRIB_ID" = "gentoo" ]; then + elif [ "$DISTRIB_ID" = "gentoo" -o "$DISTRIB_ID" = "alpine" ]; then ebegin "Starting ${TS_PACKAGE_NAME}" do_stop eend $? @@ -396,7 +398,7 @@ exit "$retval" elif [ "$DISTRIB_ID" = "fedora" -o "$DISTRIB_ID" = "redhat" ]; then action "Reloading ${NAME}:" $TL_BINARY config reload - elif [ "$DISTRIB_ID" = "gentoo" ]; then + elif [ "$DISTRIB_ID" = "gentoo" -o "$DISTRIB_ID" = "alpine" ]; then ebegin "Reloading ${NAME}" $TL_BINARY config reload eend $? @@ -460,7 +462,7 @@ status=$? [ $status -eq 0 ] || /bin/echo -n "not " echo "running." - elif [ "$DISTRIB_ID" = "FreeBSD" -o "$DISTRIB_ID" = "gentoo" ]; then + elif [ "$DISTRIB_ID" = "FreeBSD" -o "$DISTRIB_ID" = "gentoo" -o "$DISTRIB_ID" = "alpine" ]; then if pgrep $TM_NAME > /dev/null ; then echo "$TM_NAME running as pid `cat $TM_PIDFILE`" ; else echo "$TM_NAME not running" @@ -492,7 +494,7 @@ 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" = "gentoo" ]; then + elif [ "$DISTRIB_ID" = "gentoo" -o "$DISTRIB_ID" = "alpine" ]; then echo "Usage: $0 {start|stop|reload|restart|status}" elif [ "$DISTRIB_ID" = "suse" ]; then echo "Usage: $0 {start|stop|restart|status}"