Projects
jsj
jsj-installtools
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 115
View file
jsj-installtools.changes
Changed
@@ -1,4 +1,10 @@ ------------------------------------------------------------------- +Wed Dec 6 07:36:44 UTC 2023 - Stefan Botter <obs@botter.cc> + +- add error condition handling for certficate request fail in + PrepareApacheProxyHost + +------------------------------------------------------------------- Thu May 11 05:41:48 UTC 2023 - Stefan Botter <obs@botter.cc> - add ShowCertificateChainFile to easily display subject and
View file
PrepareApacheProxyHost
Changed
@@ -1,7 +1,6 @@ #!/bin/bash HOSTNAME="" SHOST="" -LOC=jsj REQCERT=0 JSJSHARE="/usr/share/jsjinstalltools" . /usr/share/jsjinstalltools/GetVersion @@ -27,6 +26,7 @@ PROXYDESTHN=${PROXYDEST%%.*} echo Proxydestination $PROXYDESTHN $PROXYDESTDN +RET=0 if -f $JSJSHARE/vhost-ssl-proxy.conf ; then if -f /etc/apache2/vhosts.d/$HOSTNAME.conf ; then echo virtual host /etc/apache2/vhosts.d/$HOSTNAME.conf file already exists. @@ -49,16 +49,22 @@ --key-file /etc/apache2/ssl.key/$HOSTNAME.$DOMAINNAME.key \ --fullchain-file /etc/apache2/ssl.crt/$HOSTNAME.$DOMAINNAME.fullchain.pem \ --reloadcmd "systemctl restart apache2" --log + RET=$? fi - echo create virtual host - sed -e "s/HOSTNAME/$HOSTNAME/" -e "s/DOMAINNAME/$DOMAINNAME/" \ - -e "s/PROXYDESTHN/$PROXYDESTHN/" -e "s/PROXYDESTDN/$PROXYDESTDN/" < $JSJSHARE/vhost-ssl-proxy.conf > /etc/apache2/vhosts.d/$HOSTNAME.conf - if ${VERSION_ID%%.*} -ge 13 ; then - sed -i -e '/^ *Order .*allow/ i\ \ \ \ \ \ \ \ Require all granted' \ - -e '/^ *Order .*allow/ d' \ - -e '/^ *\(Allow\|Deny\) from/ d' /etc/apache2/vhosts.d/$HOSTNAME.conf + if $RET != 0 ; then + cho certificate request failed, stopping. + exit 1 + else + echo create virtual host + sed -e "s/HOSTNAME/$HOSTNAME/" -e "s/DOMAINNAME/$DOMAINNAME/" \ + -e "s/PROXYDESTHN/$PROXYDESTHN/" -e "s/PROXYDESTDN/$PROXYDESTDN/" < $JSJSHARE/vhost-ssl-proxy.conf > /etc/apache2/vhosts.d/$HOSTNAME.conf + if ${VERSION_ID%%.*} -ge 13 ; then + sed -i -e '/^ *Order .*allow/ i\ \ \ \ \ \ \ \ Require all granted' \ + -e '/^ *Order .*allow/ d' \ + -e '/^ *\(Allow\|Deny\) from/ d' /etc/apache2/vhosts.d/$HOSTNAME.conf + fi + /usr/sbin/a2enmod proxy proxy_http fi - /usr/sbin/a2enmod proxy proxy_http else echo no file vhost-ssl-proxy.conf exit 1
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.