diff options
| author | Natanael Copa <ncopa@alpinelinux.org> | 2010-08-10 09:48:55 +0000 |
|---|---|---|
| committer | Natanael Copa <ncopa@alpinelinux.org> | 2010-08-10 09:48:55 +0000 |
| commit | c0367e7f1e95ef668455892afc61ebbbc53a35d9 (patch) | |
| tree | c93e79cc90f1147a5555882961458e5622a772c1 /testing/apache2/apache2-ssl.post-install | |
| parent | 4f935d99aa754ff7b8b21b489be6caf9529f9a54 (diff) | |
| download | aports-c0367e7f1e95ef668455892afc61ebbbc53a35d9.tar.bz2 aports-c0367e7f1e95ef668455892afc61ebbbc53a35d9.tar.xz | |
testing/apache2: various fixes
* fix datadir to /usr/share instead of /share
* move apxs and build dir to -dev package
* separate subpackage for ldap modules
* separate subpackage for ssl support with post-install that creates cert
ref #392
Diffstat (limited to 'testing/apache2/apache2-ssl.post-install')
| -rw-r--r-- | testing/apache2/apache2-ssl.post-install | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/testing/apache2/apache2-ssl.post-install b/testing/apache2/apache2-ssl.post-install new file mode 100644 index 0000000000..d73b5fc622 --- /dev/null +++ b/testing/apache2/apache2-ssl.post-install @@ -0,0 +1,32 @@ +#!/bin/sh + +ssldir=/etc/ssl/apache2 +sslkey=$ssldir/server.key +sslcert=$ssldir/server.pem + +umask 077 + +if [ ! -f ${sslkey} ] ; then + openssl genrsa -rand /proc/apm:/proc/cpuinfo:/proc/dma:/proc/filesystems:/proc/interrupts:/proc/ioports:/proc/pci:/proc/rtc:/proc/uptime 1024 > ${sslkey} 2> /dev/null +fi + +FQDN=`hostname -f` +if [ "x${FQDN}" = "x" ]; then + FQDN=localhost.localdomain +fi + +if [ ! -f ${sslcert} ] ; then +cat << EOF | openssl req -new -key ${sslkey} \ + -x509 -days 365 -set_serial $RANDOM \ + -out ${sslcert} 2>/dev/null +-- +SomeState +SomeCity +SomeOrganization +SomeOrganizationalUnit +${FQDN} +root@${FQDN} +EOF +fi + + |
