From 75971d8fd77c602ff441ab6da0debb6afe760c8a Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Wed, 30 Jan 2019 00:51:24 -0600 Subject: [PATCH] update --- install-linupx.sh | 3 ++- install-mysqlbu.sh | 9 +++++---- install-nodemgmt.sh | 3 ++- uninstall-linupx.sh | 4 ++-- uninstall-mysqlbu.sh | 4 ++-- uninstall-nodemgmt.sh | 4 ++-- 6 files changed, 15 insertions(+), 12 deletions(-) diff --git a/install-linupx.sh b/install-linupx.sh index 70d5b22..76a99ca 100755 --- a/install-linupx.sh +++ b/install-linupx.sh @@ -22,8 +22,9 @@ if [ ! -d "/opt/idssys/defaults" ]; then do_with_root git clone git@git.schroedercity.com:voltron/iDS-Defaults.git /opt/idssys/defaults fi +mkdir /opt/idssys/settings echo -e "useAutoremove=1 -opennms=false" > /opt/idssys/LinUPx/settings.conf +opennms=false" > /opt/idssys/settings/linupx.conf echo "" echo -e "${idsCL[Yellow]}LinUPx has been Installed${idsCL[Default]}" diff --git a/install-mysqlbu.sh b/install-mysqlbu.sh index 0d37422..2c0b928 100755 --- a/install-mysqlbu.sh +++ b/install-mysqlbu.sh @@ -19,14 +19,15 @@ echo -e "${idsCL[LightGreen]}MySQL-BU Installation Script${idsCL[Default]}" do_with_root $APTFUNC -y install wget curl git mariadb-backup do_with_root set -eu -do_with_root git clone https://git.schroedercity.com/voltron/MySQL-BU.git /opt/idssys/mysqlbu +do_with_root mkdir /opt/idssys/settings +do_with_root git clon https://git.schroedercity.com/voltron/MySQL-BU.git /opt/idssys/mysqlbu do_with_root ln -s /opt/idssys/mysqlbu/run.sh /usr/local/bin/mysqlbu echo -e "BACKUP_PATH='/var/lib/mysql-backups/' -MYSQLUSER='root' -MYSQLPASS='Dc\$@54115' +MYSQLUSER='' +MYSQLPASS='' MYSQLCFG='/etc/mysql/my.cnf' BACKUPSTOKEEP=3 -" > /opt/idssys/mysqlbu/settings.conf +" > /opt/idssys/settings/mysqlbu.conf if [ ! -d "/opt/idssys/defaults" ]; then do_with_root set -eu diff --git a/install-nodemgmt.sh b/install-nodemgmt.sh index 2bc8317..4ce50de 100755 --- a/install-nodemgmt.sh +++ b/install-nodemgmt.sh @@ -22,10 +22,11 @@ if [ ! -d "/opt/idssys/defaults" ]; then do_with_root git clone git@git.schroedercity.com:voltron/iDS-Defaults.git /opt/idssys/defaults fi +mkdir /opt/idssys/settings echo -e "NODE_HOSTNAME=\"$(hostname)\" #LOCAL_SERVICES=mysql,nginx,gitea,haproxy,keepalived,maxscale #STATUS_CHECK_EMAIL=someone@somewhere.com -" > /opt/idssys/nodemgmt/settings.conf +" > /opt/idssys/settings/nodemgmt.conf echo "" diff --git a/uninstall-linupx.sh b/uninstall-linupx.sh index 1c90d1e..3798dc6 100755 --- a/uninstall-linupx.sh +++ b/uninstall-linupx.sh @@ -18,8 +18,8 @@ do_with_root rm -Rf /opt/idssys/LinUPx if [ -d "/opt/idssys" ]; then IDSSYSF="`ls -l /opt/idssys/ | grep -c ^d`" - if [ "$IDSSYSF" = 1 ]; then - do_with_root rm -Rf /opt/idssys + if [ "$IDSSYSF" = 2 ]; then + do_with_root rm -Rf /opt/idssys/defaults fi fi diff --git a/uninstall-mysqlbu.sh b/uninstall-mysqlbu.sh index 5dae1bf..63ad311 100755 --- a/uninstall-mysqlbu.sh +++ b/uninstall-mysqlbu.sh @@ -19,8 +19,8 @@ rm -Rf /opt/idssys/mysqlbu rm -Rf /opt/mysqlbu IDSSYSF="`ls -l /opt/idssys/ | grep -c ^d`" -if [ "$IDSSYSF" = 1 ]; then - rm -Rf /opt/idssys +if [ "$IDSSYSF" = 2 ]; then + rm -Rf /opt/idssys/defaults fi echo "" diff --git a/uninstall-nodemgmt.sh b/uninstall-nodemgmt.sh index 66d12a2..8fe40da 100755 --- a/uninstall-nodemgmt.sh +++ b/uninstall-nodemgmt.sh @@ -17,8 +17,8 @@ rm -f /usr/local/bin/nodemgmt rm -Rf /opt/idssys/nodemgmt IDSSYSF="`ls -l /opt/idssys/ | grep -c ^d`" -if [ "$IDSSYSF" = 1 ]; then - rm -Rf /opt/idssys +if [ "$IDSSYSF" = 2 ]; then + rm -Rf /opt/idssys/defaults fi echo ""