mirror of
https://github.com/nsacyber/HIRS.git
synced 2025-06-20 16:10:27 +00:00
Initial release
This commit is contained in:
19
package/scripts/common/db_create.sh
Normal file
19
package/scripts/common/db_create.sh
Normal file
@ -0,0 +1,19 @@
|
||||
#!/bin/bash
|
||||
|
||||
SQL_SERVICE=`/opt/hirs/scripts/common/get_db_service.sh`
|
||||
|
||||
echo "Creating HIRS Database..."
|
||||
chkconfig $SQL_SERVICE on
|
||||
service $SQL_SERVICE start
|
||||
|
||||
CENTOS_VER=`/opt/hirs/scripts/common/get_centos_major_version.sh`
|
||||
if [ $CENTOS_VER -eq "6" ] ; then
|
||||
DB_CREATE_SCRIPT=/opt/hirs/scripts/common/db_create.sql.el6
|
||||
elif [ $CENTOS_VER -eq "7" ] ; then
|
||||
DB_CREATE_SCRIPT=/opt/hirs/scripts/common/db_create.sql.el7
|
||||
else
|
||||
echo "Unsupported CentOS version: ${CENTOS_VER}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
mysql -u root < $DB_CREATE_SCRIPT
|
Reference in New Issue
Block a user