From 2334df224e7782a4d74e9306f367bb09d4d2cd17 Mon Sep 17 00:00:00 2001 From: James Meyer Date: Mon, 14 Jan 2013 17:45:04 -0600 Subject: runit-scripts: lighttpd, on startup create the ssl cert if needed refs #896 --- abs/core/runit-scripts/PKGBUILD | 2 +- abs/core/runit-scripts/runitscripts/services/lighttpd/run | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) 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 -- cgit v0.12