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 67)
Currently displaying revision
67
,
Show latest
#!/bin/bash HOSTNAME=$1 SHOST=$2 JSJSHARE="/usr/share/jsjinstalltools" . /usr/share/jsjinstalltools/GetVersion if [ -z $HOSTNAME ]; then echo call: $0 hostname exit 1 fi if [ -z $SHOST ]; then SHOST="" else SHOST="s" fi echo $HOSTNAME zypper -n in -l phpMyAdmin 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/$SHOST$HOSTNAME/htdocs else echo no file nagiosok.html exit 1 fi if [ ${VERSION_ID/./} -lt 130 ]; 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 if [ x$SHOST = xs ]; then sed -e "s/HOSTNAME/s$HOSTNAME/" < $JSJSHARE/vhost.conf > /etc/apache2/vhosts.d/s$HOSTNAME.conf fi 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/*.conf fi else echo no file vhost.conf exit 1 fi if [ ${VERSION_ID/./} -ge 120 ]; then systemctl restart apache2.service systemctl enable apache2.service else rcapache2 restart insserv apache2 fi sed -i -e 's/\/access_log/\/*access_log/' \ -e 's/\/error_log/\/*error_log/' \ -e '/maxage/ s/[0-9]*$/7/' \ -e '/rotate/ s/[0-9]*$/7/' -e '/rotate/ a\ daily' /etc/logrotate.d/apache2
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
.