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 44)
Currently displaying revision
44
,
Show latest
#!/bin/bash HOSTNAME=$1 JSJSHARE="/usr/share/jsjinstalltools" . /usr/share/jsjinstalltools/GetVersion 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 chmod 775 /srv/www/$HOSTNAME/* chgrp www /srv/www/$HOSTNAME/* if [ -f $JSJSHARE/nagiosok.html ]; then cp $JSJSHARE/nagiosok.html /srv/www/s$HOSTNAME/htdocs else echo no file nagiosok.html exit 1 fi if [ ${VERSION%%.*} -lt 13 ]; then TEMPFILE=$(mktemp /tmp/apache_listen.XXXXXXXXXX) sed -e 's/^#\(NameVirtualHost \*:80.*$\)/\1/' < /etc/apache2/listen.conf > $TEMPFILE mv $TEMPFILE /etc/apache2/listen.conf chmod 644 /etc/apache2/listen.conf fi 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.service systemctl enable apache2.service else 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
.