Skip to content
Permalink
Browse files

Fix initial database on 1.5

  • Loading branch information...
NEMS Linux
NEMS Linux committed Feb 14, 2019
1 parent 20915e0 commit 0814956d3c416a0c4af07470dd05f7449688be29
Showing with 11 additions and 7 deletions.
  1. +9 −0 build/153-mysql
  2. +2 −7 nems-cleanup.sh
@@ -0,0 +1,9 @@
#!/bin/bash

# Replace the database with Sample database
systemctl stop mysql
rm -rf /var/lib/mysql/
cp -R /root/nems/nems-migrator/data/$(/usr/local/bin/nems-info nemsbranch)/mysql/NEMS-Sample /var/lib
mv /var/lib/NEMS-Sample /var/lib/mysql
chown -R mysql:mysql /var/lib/mysql
systemctl start mysql
@@ -184,13 +184,8 @@ nameserver 2001:4860:4860::8844
/root/nems/nems-admin/nems-restore-sample-db.sh

# Replace the database with Sample database
systemctl stop mysql
rm -rf /var/lib/mysql/
cp -R /root/nems/nems-migrator/data/1.4/mysql/NEMS-Sample /var/lib
mv /var/lib/NEMS-Sample /var/lib/mysql
chown -R mysql:mysql /var/lib/mysql
systemctl start mysql

/root/nems/nems-admin/build/153-mysql

# Remove nconf history, should it exist
mysql -u nconf -pnagiosadmin nconf -e "TRUNCATE History"

0 comments on commit 0814956

Please sign in to comment.
You can’t perform that action at this time.