Permalink
Browse files

NEMS 1.5 initialization fully functional

  • Loading branch information...
NEMS Linux
NEMS Linux committed Dec 4, 2018
1 parent 44bbae8 commit 66699e86d64ce8fbe730789734b247ace7523b8c
Showing with 11 additions and 17 deletions.
  1. +11 −17 nems-push-db.sh
@@ -41,23 +41,17 @@ cp -R /var/lib/mysql .
systemctl start mysql
# Replace my user info with defaults
#echo "Before:"
#mysql -t -u nconf -pnagiosadmin nconf -e "SELECT * FROM ConfigValues WHERE fk_id_attr=47;"
#mysql -t -u nconf -pnagiosadmin nconf -e "UPDATE ConfigValues SET attr_value='nemsadmin' WHERE fk_id_attr=47;"
#echo "After:"
#mysql -t -u nconf -pnagiosadmin nconf -e "SELECT * FROM ConfigValues WHERE fk_id_attr=47;"
#echo "Before:"
#mysql -t -u nconf -pnagiosadmin nconf -e "SELECT * FROM ConfigValues WHERE fk_id_attr=55;"
#mysql -t -u nconf -pnagiosadmin nconf -e "UPDATE ConfigValues SET attr_value='nagios@localhost' WHERE fk_id_attr=55;"
#echo "After:"
#mysql -t -u nconf -pnagiosadmin nconf -e "SELECT * FROM ConfigValues WHERE fk_id_attr=55;"
echo "Login to NEMS Configurator and delete:
- Contacts
- Contact Groups
"
read -n 1 -s -r -p "Press any key to continue"
echo "Before:"
mysql -t -u nconf -pnagiosadmin nconf -e "SELECT * FROM ConfigValues WHERE fk_id_attr=47;"
mysql -t -u nconf -pnagiosadmin nconf -e "UPDATE ConfigValues SET attr_value='nemsadmin' WHERE fk_id_attr=47;"
echo "After:"
mysql -t -u nconf -pnagiosadmin nconf -e "SELECT * FROM ConfigValues WHERE fk_id_attr=47;"
echo "Before:"
mysql -t -u nconf -pnagiosadmin nconf -e "SELECT * FROM ConfigValues WHERE fk_id_attr=55;"
mysql -t -u nconf -pnagiosadmin nconf -e "UPDATE ConfigValues SET attr_value='nagios@localhost' WHERE fk_id_attr=55;"
echo "After:"
mysql -t -u nconf -pnagiosadmin nconf -e "SELECT * FROM ConfigValues WHERE fk_id_attr=55;"
systemctl stop mysql

0 comments on commit 66699e8

Please sign in to comment.