Projects
jsj
jsj-installtools
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 51
View file
jsj-installtools.changes
Changed
@@ -1,4 +1,10 @@ ------------------------------------------------------------------- +Thu Mar 17 12:58:32 UTC 2016 - obs@botter.cc + +- update GetVersion to catch VERSION_ID, set Tumbleweed to 99.9 +- update scripts to use VERSION_ID when needed + +------------------------------------------------------------------- Thu Mar 17 12:46:44 UTC 2016 - obs@botter.cc - update GetVersion to detect Tumbelweed
View file
GetVersion
Changed
@@ -2,9 +2,13 @@ VERSION=$(egrep VERSION= /etc/os-release | cut -f2 -d= | tr -d " \"") if $VERSION != "Tumbleweed" ; then VERSION=$(egrep VERSION_ID /etc/os-release | cut -f2 -d= | tr -d " \"") + VERSION_ID=$VERSION + else + VERSION_ID=99.9 fi elif -f /etc/SuSE-release ; then VERSION=$(egrep VERSION /etc/SuSE-release | cut -f2 -d= | tr -d " ") + VERSION_ID=$VERSION else echo No file /etc/os-release or /etc/SuSE-release available. Stop. exit 1
View file
PrepareApacheConfig
Changed
@@ -18,7 +18,7 @@ echo no file nagiosok.html exit 1 fi -if ${VERSION%%.*} -lt 13 ; then +if ${VERSION_ID%%.*} -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 @@ -27,7 +27,7 @@ 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 - if ${VERSION%%.*} -ge 13 ; then + 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 @@ -37,7 +37,7 @@ exit 1 fi zypper -n in -l phpMyAdmin -if ${VERSION%%.*} -ge 12 ; then +if ${VERSION_ID%%.*} -ge 12 ; then systemctl restart apache2.service systemctl enable apache2.service else
View file
PrepareFTPd
Changed
@@ -14,7 +14,7 @@ sed -e "s/\(^www.*$\)/\1$USER/" < /etc/group > $GROUPFILE mv $GROUPFILE /etc/group chmod 644 /etc/group -if ${VERSION%%.*} -ge 12 ; then +if ${VERSION_ID%%.*} -ge 12 ; then zypper -n in -l vsftpd cp /etc/vsftpd.conf /etc/vsftpd.conf.orig sed -e 's/^\(write_enable=\).*$/\1YES/' -e 's/^#\(local_umask=\).*$/\1 022/' \
View file
PrepareMysqlBackup
Changed
@@ -1,13 +1,13 @@ #!/bin/bash . /usr/share/jsjinstalltools/GetVersion -if ${VERSION%%.*} -ge 12 ; then +if ${VERSION_ID%%.*} -ge 12 ; then systemctl is-active mysql.service else rcmysql status fi RET=$? if $RET != 0 ; then - if ${VERSION%%.*} -ge 12 ; then + if ${VERSION_ID%%.*} -ge 12 ; then systemctl start mysql.service systemctl enable mysql.service else
View file
PrepareNagiosTests
Changed
@@ -6,13 +6,13 @@ fi zypper -n in -l nrpe monitoring-plugins-zypper nagios-plugins-kernel check_mk-agent rdiff-backup rsync -vaPH nagios.jacobs-university.de::nagios/ /etc/nagios/ -if ${VERSION%%.*} -ge 12 ; then +if ${VERSION_ID%%.*} -ge 12 ; then sed -e '/pid_file/ s/pid_file=.*/pid_file=\/var\/run\/nrpe\/nrpe.pid/' < /etc/nagios/nrpe.cfg > /etc/nagios/nrpe.cfg.new mv /etc/nagios/nrpe.cfg.new /etc/nagios/nrpe.cfg cp /etc/nagios/nrpe.cfg /etc systemctl enable nrpe.service systemctl start nrpe.service - if ${VERSION%%.*} -ge 13 ; then + if ${VERSION_ID%%.*} -ge 13 ; then systemctl enable check_mk-agent.socket systemctl start check_mk-agent.socket else
View file
PreparePostfix
Changed
@@ -5,7 +5,7 @@ fi . /usr/share/jsjinstalltools/GetVersion HOSTNAME=$1 -if ${VERSION%%.*} -ge 13 ; then +if ${VERSION_ID%%.*} -ge 13 ; then echo $HOSTNAME".site" > /etc/HOSTNAME fi cp /etc/postfix/main.cf /etc/postfix/main.cf.orig @@ -22,7 +22,7 @@ mv $ALIASES /etc/aliases chmod 644 /etc/aliases newaliases -if ${VERSION%%.*} -ge 12 ; then +if ${VERSION_ID%%.*} -ge 12 ; then systemctl restart postfix.service systemctl enable postfix.service else
View file
PrepareUpdateCrontab
Changed
@@ -16,6 +16,6 @@ fi ( crontab -l; echo "$((0x$(head -c2 /dev/urandom | hexdump | awk '$2 > 0 {print $2}') % 60)) 5 * * * zypper -n up --auto-agree-with-licenses" ) | \ egrep -v "^#" | crontab - -if ${VERSION/./} -ge 132 ; then +if ${VERSION_ID/./} -ge 132 ; then systemctl enable logrotate.timer 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
.