diff options
author | jlam <jlam@pkgsrc.org> | 2000-09-12 14:50:51 +0000 |
---|---|---|
committer | jlam <jlam@pkgsrc.org> | 2000-09-12 14:50:51 +0000 |
commit | ddf76514979c9666cc4268b6b70c72fe04e7160b (patch) | |
tree | 724343322d25eda875fcb4cd00364511ad4b0334 /www | |
parent | a29e7d6317bc6121ef716556ac8bf43ad3a890f6 (diff) | |
download | pkgsrc-ddf76514979c9666cc4268b6b70c72fe04e7160b.tar.gz |
Provide mechanism to allow ap-ssl to force start of apache with "startssl".
Diffstat (limited to 'www')
-rw-r--r-- | www/apache/files/apache.sh | 35 |
1 files changed, 29 insertions, 6 deletions
diff --git a/www/apache/files/apache.sh b/www/apache/files/apache.sh index 3d85a5c5c46..61b1d4f9022 100644 --- a/www/apache/files/apache.sh +++ b/www/apache/files/apache.sh @@ -1,13 +1,36 @@ -#!/bin/sh +#! /bin/sh # -# $NetBSD: apache.sh,v 1.3 2000/07/10 12:22:27 hubertf Exp $ +# $NetBSD: apache.sh,v 1.4 2000/09/12 14:50:51 jlam Exp $ # +# PROVIDE: apache +# REQUIRE: DAEMON -CMD=${1:-start} +name="apache" +command="@PREFIX@/sbin/apachectl" +pidfile="/var/run/httpd.pid" +conffile="@PREFIX@/etc/httpd/httpd.conf" -if [ -x @PREFIX@/sbin/httpd -a -f @PREFIX@/etc/httpd/httpd.conf ] +apache_start="start" + +if [ -f @PREFIX@/etc/mod_ssl.conf ] then - @PREFIX@/sbin/apachectl $CMD >/dev/null - echo -n ' apache' + # This file can reset apache_start to "startssl" + . @PREFIX@/etc/httpd/mod_ssl.conf fi + +cmd=${1:-start} + +case ${cmd} in +start) + if [ -x ${command} -a -f ${conffile} ]; then + echo "Starting ${name}." + ${command} ${apache_start} + fi + ;; +*) + if [ -x ${command} ]; then + ${command} ${cmd} + fi + ;; +esac exit 0 |