From 9de7cf7c9babea8e10e81109db03bf44b134bbee Mon Sep 17 00:00:00 2001 From: Olaf Rempel Date: Sun, 19 Apr 2009 18:53:20 +0200 Subject: [PATCH] add init scripts --- init-scripts/apache22-be | 55 ++++++++++++++++++++++++++++++++++++++++ init-scripts/apache22-fe | 55 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 110 insertions(+) create mode 100755 init-scripts/apache22-be create mode 100755 init-scripts/apache22-fe diff --git a/init-scripts/apache22-be b/init-scripts/apache22-be new file mode 100755 index 0000000..79a35d4 --- /dev/null +++ b/init-scripts/apache22-be @@ -0,0 +1,55 @@ +#! /bin/sh +### BEGIN INIT INFO +# Provides: apache22-be +# Required-Start: $network +# Required-Stop: $network +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: apache22-be initscript +# Description: none +### END INIT INFO + +PATH=/sbin:/usr/sbin:/bin:/usr/bin +DESC="Apache22 Backend" + +APACHECTL="/opt/apache22-backend/bin/apachectl" +[ -x "$APACHECTL" ] || exit 0 + +# Load the VERBOSE setting and other rcS variables +. /lib/init/vars.sh + +# Define LSB log_* functions. +# Depend on lsb-base (>= 3.0-6) to ensure that this file is present. +. /lib/lsb/init-functions + +case "$1" in +start) + log_daemon_msg "Starting $DESC" + $APACHECTL -k start + case "$?" in + 0) log_end_msg 0 ;; + *) log_end_msg 1 ;; + esac + ;; +stop) + log_daemon_msg "Stopping $DESC" + $APACHECTL -k stop + case "$?" in + 0) log_end_msg 0 ;; + *) log_end_msg 1 ;; + esac + ;; +restart) + log_daemon_msg "Stopping $DESC" + $APACHECTL -k restart + case "$?" in + 0) log_end_msg 0 ;; + *) log_end_msg 1 ;; + esac + ;; + +*) + echo "Usage: $0 {start|stop|restart}" >&2 + exit 3 + ;; +esac diff --git a/init-scripts/apache22-fe b/init-scripts/apache22-fe new file mode 100755 index 0000000..99bf723 --- /dev/null +++ b/init-scripts/apache22-fe @@ -0,0 +1,55 @@ +#! /bin/sh +### BEGIN INIT INFO +# Provides: apache22-be +# Required-Start: $network +# Required-Stop: $network +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: apache22-fe initscript +# Description: none +### END INIT INFO + +PATH=/sbin:/usr/sbin:/bin:/usr/bin +DESC="Apache22 Frontend" + +APACHECTL="/opt/apache22-frontend/bin/apachectl" +[ -x "$APACHECTL" ] || exit 0 + +# Load the VERBOSE setting and other rcS variables +. /lib/init/vars.sh + +# Define LSB log_* functions. +# Depend on lsb-base (>= 3.0-6) to ensure that this file is present. +. /lib/lsb/init-functions + +case "$1" in +start) + log_daemon_msg "Starting $DESC" + $APACHECTL -k start + case "$?" in + 0) log_end_msg 0 ;; + *) log_end_msg 1 ;; + esac + ;; +stop) + log_daemon_msg "Stopping $DESC" + $APACHECTL -k stop + case "$?" in + 0) log_end_msg 0 ;; + *) log_end_msg 1 ;; + esac + ;; +restart) + log_daemon_msg "Stopping $DESC" + $APACHECTL -k restart + case "$?" in + 0) log_end_msg 0 ;; + *) log_end_msg 1 ;; + esac + ;; + +*) + echo "Usage: $0 {start|stop|restart}" >&2 + exit 3 + ;; +esac