Projects
jsj
jsj-installtools
PrepareApacheConfig
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File PrepareApacheConfig of Package jsj-installtools (Revision 18)
Currently displaying revision
18
,
Show latest
#!/bin/bash HOSTNAME=$1 JSJSHARE="/usr/share/jsjinstalltools" if [ -f /etc/SuSE-release ]; then VERSION=$(egrep VERSION /etc/SuSE-release | cut -f2 -d= | tr -d " ") else echo No file /etc/SuSE-release available. Stop. exit 1 fi if [ -z $HOSTNAME ]; then echo call: $0 hostname exit 1 fi echo $HOSTNAME for h in $HOSTNAME s$HOSTNAME; do mkdir -p /srv/www/$h/htdocs /srv/www/$h/cgi-bin done if [ -f $JSJSHARE/nagiosok.html ]; then cp $JSJSHARE/nagiosok.html /srv/www/s$HOSTNAME/htdocs else echo no file nagiosok.html exit 1 fi TEMPFILE=$(mktemp /tmp/apache_listen.XXXXXXXXXX) sed -e 's/^#\(NameVirtualHost \*:80.*$\)/\1/' < /etc/apache2/listen.conf > $TEMPFILE mv $TEMPFILE /etc/apache2/listen.conf if [ -f $JSJSHARE/vhost.conf ]; then sed -e "s/HOSTNAME/$HOSTNAME/" < $JSJSHARE/vhost.conf > /etc/apache2/vhosts.d/$HOSTNAME.conf sed -e "s/HOSTNAME/s$HOSTNAME/" < $JSJSHARE/vhost.conf > /etc/apache2/vhosts.d/s$HOSTNAME.conf else echo no file vhost.conf exit 1 fi zypper -n in -l phpMyAdmin if [ ${VERSION%%.*} -ge 12 ]; then systemctl restart apache2 systemctl enable apache2 elso rcapache2 restart insserv apache2 fi
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
.