summaryrefslogtreecommitdiffstats
path: root/abs/core/runit-scripts
diff options
context:
space:
mode:
authorJames Meyer <james.meyer@operamail.com>2013-01-14 23:45:04 (GMT)
committerJames Meyer <james.meyer@operamail.com>2013-01-14 23:45:04 (GMT)
commit2334df224e7782a4d74e9306f367bb09d4d2cd17 (patch)
tree830e7c643899028c7f68dd7243a6447d23ea86eb /abs/core/runit-scripts
parent287207a3488c0fe779458537378d7fc1474813db (diff)
downloadlinhes_pkgbuild-2334df224e7782a4d74e9306f367bb09d4d2cd17.zip
linhes_pkgbuild-2334df224e7782a4d74e9306f367bb09d4d2cd17.tar.gz
linhes_pkgbuild-2334df224e7782a4d74e9306f367bb09d4d2cd17.tar.bz2
runit-scripts: lighttpd, on startup create the ssl cert if needed
refs #896
Diffstat (limited to 'abs/core/runit-scripts')
-rwxr-xr-xabs/core/runit-scripts/PKGBUILD2
-rwxr-xr-xabs/core/runit-scripts/runitscripts/services/lighttpd/run15
2 files changed, 16 insertions, 1 deletions
diff --git a/abs/core/runit-scripts/PKGBUILD b/abs/core/runit-scripts/PKGBUILD
index 36c9ddd..70d3da9 100755
--- a/abs/core/runit-scripts/PKGBUILD
+++ b/abs/core/runit-scripts/PKGBUILD
@@ -1,6 +1,6 @@
pkgname=runit-scripts
pkgver=2.1.1
-pkgrel=107
+pkgrel=110
pkgdesc="collection of startup scripts for runit"
url="http://smarden.org/runit/"
license="BSD"
diff --git a/abs/core/runit-scripts/runitscripts/services/lighttpd/run b/abs/core/runit-scripts/runitscripts/services/lighttpd/run
index f9c574d..3ac10e5 100755
--- a/abs/core/runit-scripts/runitscripts/services/lighttpd/run
+++ b/abs/core/runit-scripts/runitscripts/services/lighttpd/run
@@ -4,6 +4,21 @@ export TERM=linux
. /etc/rc.d/functions
stat_runit "Starting lighttpd"
+#---creating ssl cert
+if [ ! -f /etc/lighttpd/linhes.pem ]
+then
+ . /etc/systemconfig
+ /usr/bin/openssl req -new -x509 -keyout /etc/lighttpd/linhes.pem -out /etc/lighttpd/linhes.pem -days 4390 -nodes -subj "/C=/ST=/L=/O=LinHES/OU=LinHES Entertainment Server/CN=$hostname"
+ if [ $? = 0 ]
+ then
+ echo "include \"/etc/lighttpd/ssl-inc.conf\"" > /etc/gen_light_conf.d/ssl-inc.conf
+ else
+ rm -f /etc/lighttpd/linhes.pem
+ fi
+ /usr/LH/bin/gen_light_include.py
+fi
+#--end creating ssl cert
+
if [ ! -d /var/run/lighttpd ] ; then
mkdir -p /var/run/lighttpd
chown http /var/run/lighttpd