Skip to content

Commit

Permalink
setup apache
Browse files Browse the repository at this point in the history
  • Loading branch information
mbussolotto committed Sep 20, 2023
1 parent 02a34a2 commit ddadf1c
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions susemanager/bin/mgr-setup
Original file line number Diff line number Diff line change
Expand Up @@ -408,6 +408,22 @@ if [ -f $MANAGER_COMPLETE ]; then
fi
}



#TODO most of the apache configuration are set in the perl script, so these changes should be there...but since we want to deprecate perl, the final
# goal would be to move everything here.
#
setup_apache() {

sed 's|DocumentRoot "/srv|DocumentRoot "/usr/share/susemanager|g' /etc/apache2/default-server.conf
sed 's|<Directory "/srv|<Directory "/usr/share/susemanager|g' /etc/apache2/default-server.conf
sed 's|<Directory "/srv|<Directory "/usr/share/susemanager|g' /etc/apache2/conf.d/zz-spacewalk-www.conf
sed 's|ScriptAlias /cgi-bin/ "/srv|ScriptAlias /cgi-bin/ "/usr/share/susemanager|g' /etc/apache2/default-server.conf
sed 's|DocumentRoot "/srv|DocumentRoot "/usr/share/susemanager|g' /etc/apache2/vhosts.d/vhost-ssl.conf
sed 's|DocumentRoot "/srv|DocumentRoot "/usr/share/susemanager|g' /etc/apache2/vhosts.d/vhost-ssl.template
}


setup_spacewalk() {
CERT_COUNTRY=`echo -n $CERT_COUNTRY|tr '[:lower:]' '[:upper:]'`

Expand Down Expand Up @@ -506,6 +522,8 @@ ssl-server-key = $SERVER_KEY" >> /root/spacewalk-answers
/usr/sbin/mgr-package-rpm-certificate-osimage
fi

setup_apache

# rm /root/spacewalk-answers
if [ "$SWRET" != "0" ]; then
echo "ERROR: spacewalk-setup failed" >&2
Expand Down

0 comments on commit ddadf1c

Please sign in to comment.