apache: use mksslcert in start script

This commit is contained in:
Juergen Daubert 2006-02-24 18:42:01 +00:00
parent 6d6e8565d7
commit ee8d96bc0b
2 changed files with 2 additions and 13 deletions

View File

@ -1,4 +1,4 @@
f24f3dc3ad72b20aa38aea6349365590 apache
84a3d5bafe682aa10d75526cb4aef731 apache
ab96591dd7e71324f885ec0525162813 apache-ssl_cert.patch
bd931fee9d102c361e95ad318d199674 crux.layout
f1b5b65c8661db9ffe38b5a4a865a0e2 httpd-2.0.55.tar.bz2

View File

@ -5,24 +5,13 @@
#START=start
START=startssl
KEY=/etc/ssl/keys/apache.key
CRT=/etc/ssl/certs/apache.crt
make_cert() {
FQDN=$(hostname -f) || FQDN=localhost
echo "Creating SSL certificate $CRT for host $FQDN"
INFO=".\n.\n.\n.\n.\n$FQDN\nroot@$FQDN"
OPTS="req -new -nodes -x509 -days 365 -newkey rsa:1024"
echo -e $INFO | openssl $OPTS -out $CRT -keyout $KEY 2> /dev/null
chmod 0600 $CRT $KEY
}
case $1 in
start)
if [ ! -s $KEY -o ! -s $CRT ]; then
make_cert
/usr/bin/mksslcert $KEY $CRT
fi
/usr/sbin/apachectl $START
;;