add init scripts

This commit is contained in:
Olaf Rempel 2009-04-19 18:53:20 +02:00
parent f7c69ce2d8
commit 9de7cf7c9b
2 changed files with 110 additions and 0 deletions

55
init-scripts/apache22-be Executable file
View File

@ -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

55
init-scripts/apache22-fe Executable file
View File

@ -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