diff --git a/data/reconcile-nagios.sh b/data/reconcile-nagios.sh index b81c1c4..8e7c5ef 100755 --- a/data/reconcile-nagios.sh +++ b/data/reconcile-nagios.sh @@ -7,6 +7,8 @@ $confdest = $argv[3]; // This script is used to reconcile the settings for default NEMS Nagios configs with your NEMS-Migrator backup. // We'll take care of the commands / services / hosts configs, but will leave users as is so we don't clobber the nems-init account data + echo "reconcile-nagios..."; + $files = array( array('file'=>'Default_collector/advanced_services.cfg','unique'=>'service_description'), array('file'=>'Default_collector/hostgroups.cfg','unique'=>'hostgroup_name'), diff --git a/data/reconcile-resource.sh b/data/reconcile-resource.sh index de5e0f8..0de16dd 100755 --- a/data/reconcile-resource.sh +++ b/data/reconcile-resource.sh @@ -5,6 +5,8 @@ # Traditional "replacement" of the config file would result in those new settings missing. # So this script consolidates the data between the source (backup.nems) and destination (resource.cfg). + echo "reconcile-resource..."; + $resourcesrc = $argv[1]; $resourcedest = $argv[2]; diff --git a/data/samba/smb.conf b/data/samba/smb.conf index 6c5af55..38edeee 100644 --- a/data/samba/smb.conf +++ b/data/samba/smb.conf @@ -273,3 +273,15 @@ force group = www-data force user = www-data +[Home] + comment = nemsadmin Home Folder + read only = no + locking = no + path = "/home/nemsadmin" + guest ok = no + browsable = yes + valid users = nemsadmin + create mode = 0777 + directory mode = 0777 + force group = nemsadmin + force user = nemsadmin diff --git a/restore.sh b/restore.sh index 43e173a..da17266 100755 --- a/restore.sh +++ b/restore.sh @@ -90,7 +90,7 @@ else if [[ $response =~ ^([yY][eE][sS]|[yY])$ ]]; then cd /tmp/nems_migrator_restore - tar -zxf $1 + tar -zxf "$1" # if this is an encrypted set, decrypt if [[ -f /tmp/nems_migrator_restore/tmp/private.tar.gz.gpg ]]; then @@ -151,10 +151,9 @@ else service $nagios stop # I know I warned you, but I love you too much to let you risk it. - /root/nems/nems-migrator/backup.sh > /dev/null 2>&1 cp -p /var/www/html/backup/snapshot/backup.nems /root/ - if (( $(echo "$ver >= 1.4" | bc -l) )); then + if (( $(awk 'BEGIN {print ("'$backupver'" >= "'1.4'")}') )); then confsrc=/etc/nems/conf resourcesrc=/usr/local/nagios/etc else @@ -162,8 +161,7 @@ else resourcesrc=/etc/nagios3 fi - echo Input: "/tmp/nems_migrator_restore$confsrc" - + echo "Source: /tmp/nems_migrator_restore$confsrc" if [[ -d "/tmp/nems_migrator_restore$confsrc" ]]; then