apache: use mksslcert in start script
This commit is contained in:
parent
6d6e8565d7
commit
ee8d96bc0b
@ -1,4 +1,4 @@
|
|||||||
f24f3dc3ad72b20aa38aea6349365590 apache
|
84a3d5bafe682aa10d75526cb4aef731 apache
|
||||||
ab96591dd7e71324f885ec0525162813 apache-ssl_cert.patch
|
ab96591dd7e71324f885ec0525162813 apache-ssl_cert.patch
|
||||||
bd931fee9d102c361e95ad318d199674 crux.layout
|
bd931fee9d102c361e95ad318d199674 crux.layout
|
||||||
f1b5b65c8661db9ffe38b5a4a865a0e2 httpd-2.0.55.tar.bz2
|
f1b5b65c8661db9ffe38b5a4a865a0e2 httpd-2.0.55.tar.bz2
|
||||||
|
@ -5,24 +5,13 @@
|
|||||||
|
|
||||||
#START=start
|
#START=start
|
||||||
START=startssl
|
START=startssl
|
||||||
|
|
||||||
KEY=/etc/ssl/keys/apache.key
|
KEY=/etc/ssl/keys/apache.key
|
||||||
CRT=/etc/ssl/certs/apache.crt
|
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
|
case $1 in
|
||||||
start)
|
start)
|
||||||
if [ ! -s $KEY -o ! -s $CRT ]; then
|
if [ ! -s $KEY -o ! -s $CRT ]; then
|
||||||
make_cert
|
/usr/bin/mksslcert $KEY $CRT
|
||||||
fi
|
fi
|
||||||
/usr/sbin/apachectl $START
|
/usr/sbin/apachectl $START
|
||||||
;;
|
;;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user