Two small fixes for openSUSE support

- Use right package files for openSUSE in tools/info.sh
- Use a2enmod to enable the wsgi apache module

Change-Id: I51e3019be32dc0938674c9c8d285a55f5b023707
This commit is contained in:
Vincent Untz 2012-12-04 18:34:25 +01:00
parent 63ea3185de
commit f2a18c065e
2 changed files with 5 additions and 4 deletions

View File

@ -79,7 +79,7 @@ function init_horizon() {
# Be a good citizen and use the distro tools here # Be a good citizen and use the distro tools here
sudo touch /etc/$APACHE_NAME/$APACHE_CONF sudo touch /etc/$APACHE_NAME/$APACHE_CONF
sudo a2ensite horizon sudo a2ensite horizon
# WSGI doesn't enable by default, enable it # WSGI isn't enabled by default, enable it
sudo a2enmod wsgi sudo a2enmod wsgi
elif is_fedora; then elif is_fedora; then
APACHE_NAME=httpd APACHE_NAME=httpd
@ -88,9 +88,8 @@ function init_horizon() {
elif is_suse; then elif is_suse; then
APACHE_NAME=apache2 APACHE_NAME=apache2
APACHE_CONF=vhosts.d/horizon.conf APACHE_CONF=vhosts.d/horizon.conf
# Append wsgi to the list of modules to load # WSGI isn't enabled by default, enable it
grep -q "^APACHE_MODULES=.*wsgi" /etc/sysconfig/apache2 || sudo a2enmod wsgi
sudo sed '/^APACHE_MODULES=/s/^\(.*\)"$/\1 wsgi"/' -i /etc/sysconfig/apache2
else else
exit_distro_not_supported "apache configuration" exit_distro_not_supported "apache configuration"
fi fi

View File

@ -92,6 +92,8 @@ if is_ubuntu; then
PKG_DIR=$FILES/apts PKG_DIR=$FILES/apts
elif is_fedora; then elif is_fedora; then
PKG_DIR=$FILES/rpms PKG_DIR=$FILES/rpms
elif is_suse; then
PKG_DIR=$FILES/rpms-suse
else else
exit_distro_not_supported "list of packages" exit_distro_not_supported "list of packages"
fi fi