summaryrefslogtreecommitdiffstats
path: root/satellit_upgrader
diff options
context:
space:
mode:
authorSimon Rettberg2018-01-12 22:55:26 +0100
committerSimon Rettberg2018-01-12 22:55:26 +0100
commit8df16d0928796c7615bdd91c35804ed5a1cd4458 (patch)
tree39d76af4041e0c03840be2502ca6352f23635835 /satellit_upgrader
parent[SSUS] Remove old files when updating slx-admin; check OS version more thorou... (diff)
downloadsetup-scripts-8df16d0928796c7615bdd91c35804ed5a1cd4458.tar.gz
setup-scripts-8df16d0928796c7615bdd91c35804ed5a1cd4458.tar.xz
setup-scripts-8df16d0928796c7615bdd91c35804ed5a1cd4458.zip
[SSUS] Extract cert from cert-key combo .pem
Diffstat (limited to 'satellit_upgrader')
-rw-r--r--satellit_upgrader/updater.template.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/satellit_upgrader/updater.template.sh b/satellit_upgrader/updater.template.sh
index e50b020..d58d850 100644
--- a/satellit_upgrader/updater.template.sh
+++ b/satellit_upgrader/updater.template.sh
@@ -394,6 +394,14 @@ if [ -e "$FILEDIR/patch_lighttpd_phpchildren" ]; then
fi
fi
+# ****************** lighttpd extract cert *****************
+declare -rg CERT_KEY_FILE="/etc/lighttpd/server.pem"
+declare -rg PUB_CERT_FILE="/etc/lighttpd/pub-cert.pem"
+if [ -s "$CERT_KEY_FILE" ] && ! [ -s "$PUB_CERT_FILE" ]; then
+ echo "Extracting public certificate from server.pem"
+ openssl x509 -outform pem -in "$CERT_KEY_FILE" -out "$PUB_CERT_FILE"
+fi
+
# ************************** PHP ***************************
declare -rg PHPINIFILE=/etc/php5/cgi/php.ini