aboutsummaryrefslogtreecommitdiffstats
path: root/www/apache20/files/apache.sh
blob: ab1a71895d0c7833dd95a24380c6c4499297cf5c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/sh
PREFIX=@@PREFIX@@

case "$1" in
start)
    [ "@@SSL@@" = "ssl" -a -f "$PREFIX/etc/apache2/ssl.crt/server.crt" ] && SSL=ssl
    [ -x ${PREFIX}/sbin/apachectl ] && ${PREFIX}/sbin/apachectl start${SSL} > /dev/null && echo -n ' apache2'
    ;;
stop)
    [ -r /var/run/httpd.pid ] && ${PREFIX}/sbin/apachectl stop > /dev/null && echo -n ' apache2'
    ;;
*)
    echo "Usage: `basename $0` {start|stop}" >&2
    ;;
esac

exit 0