Projects
jsj
jsj-installtools
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 18
View file
CreateConfig
Changed
@@ -1,10 +1,13 @@ #!/bin/bash MYSQL=0 MYSQLPW="" -APACHE="" +APACHE=0 +APACHEHOST="" +PUREFTPD=0 +PUREFTPDPW="" YES="" if $# -lt 1 ; then - echo "call: $0 MYSQL=mysqlpassword APACHE=hostname" + echo "call: $0 MYSQL=mysqlpassword APACHE=hostname PUREFTPD=pureftpdpassword" exit 1 fi while ! -z $1 ; do @@ -20,38 +23,69 @@ ;; apache=*|APACHE=*) AW=${1##*=} if ! -z $AW ; then - APACHE=$AW + APACHEHOST=$AW + APACHE=1 else echo no apache hostname! exit 1 fi ;; + pureftpd=*|PUREFTPD=*) AW=${1##*=} + if ! -z $AW ; then + PUREFTPDPW=$AW + PUREFTPD=1 + else + echo no pureftpd user password! + exit 1 + fi + ;; *) echo do not know how to deal with $1 exit 1 ;; esac shift done +if $PUREFTP ; then + if $APACHE = 0 ; then + echo pure-ftpd without apache not feasible. + exit 1 + fi +fi echo -n "Prepare MySQL password and backup: " case $MYSQL in 0) echo no.;; 1) echo yes. echo " $MYSQLPW";; esac -echo "Setup Apache for hostname(s): $APACHE" +echo "Setup Apache for hostname(s): $APACHEHOST" +echo "Setup pure-ftpd to Apache for User:$APACHEHOST w/ PW $PUREFTPDPW" echo "correct? (yes/NO)" read AW if -z $AW ; then YES=no; else YES=$AW; fi if $YES = "yes" ; then echo PrepareNagiosTests /usr/share/jsjinstalltools/PrepareNagiosTests + echo $? + echo echo PrepareUpdateCrontab /usr/share/jsjinstalltools/PrepareUpdateCrontab - echo PrepareApacheConfig $APACHE - /usr/share/jsjinstalltools/PrepareApacheConfig $APACHE + echo $? + echo + echo PrepareApacheConfig $APACHEHOST + /usr/share/jsjinstalltools/PrepareApacheConfig $APACHEHOST + echo $? + echo + if $PUREFTPD = 1 ; then + echo PreparePureFTPd $APACHEHOST + /usr/share/jsjinstalltools/PreparePureFTPd $APACHEHOST $PUREFTPDPW + echo $? + echo + fi if $MYSQL = 1 ; then echo PrepareMysqlBackup $MYSQLPW /usr/share/jsjinstalltools/PrepareMysqlBackup $MYSQLPW + echo $? + echo fi else echo aborted.
View file
PrepareApacheConfig
Changed
@@ -1,6 +1,12 @@ #!/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 @@ -26,4 +32,10 @@ exit 1 fi zypper -n in -l phpMyAdmin -rcapache2 restart +if ${VERSION%%.*} -ge 12 ; then + systemctl restart apache2 + systemctl enable apache2 +elso + rcapache2 restart + insserv apache2 +fi
View file
PrepareMysqlBackup
Changed
@@ -5,17 +5,19 @@ echo No file /etc/SuSE-release available. Stop. exit 1 fi -if ${VERSION%%.*} -lt 12 ; then - rcmysql status -else +if ${VERSION%%.*} -ge 12 ; then systemctl status mysql.service +else + rcmysql status fi RET=$? if $RET != 0 ; then - if ${VERSION%%.*} -lt 12 ; then - rcmysql start - else + if ${VERSION%%.*} -ge 12 ; then systemctl start mysql.service + systemctl enable mysql.service + else + rcmysql start + insserv mysql fi fi ADMINPW=$1
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
.