diff options
author | Simon Rettberg | 2018-01-12 22:55:26 +0100 |
---|---|---|
committer | Simon Rettberg | 2018-01-12 22:55:26 +0100 |
commit | 8df16d0928796c7615bdd91c35804ed5a1cd4458 (patch) | |
tree | 39d76af4041e0c03840be2502ca6352f23635835 /satellit_upgrader | |
parent | [SSUS] Remove old files when updating slx-admin; check OS version more thorou... (diff) | |
download | setup-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.sh | 8 |
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 |