mirror of
https://github.com/nsacyber/HIRS.git
synced 2025-06-16 14:18:25 +00:00
Files added for ACA Docker image workflow
This commit is contained in:
19
scripts/aca_image_setup.sh
Normal file
19
scripts/aca_image_setup.sh
Normal file
@ -0,0 +1,19 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Setup db
|
||||
|
||||
if [[ $(pgrep -c -u mysql mysqld) -ne 0 ]]; then
|
||||
echo "shutting down ..."
|
||||
usr/bin/mysqladmin -u root shutdown -p;
|
||||
fi
|
||||
|
||||
/usr/libexec/mariadb-prepare-db-dir
|
||||
nohup /usr/bin/mysqld_safe --basedir=/usr &>/dev/null &
|
||||
MYSQLD_PID=$(pgrep -u mysql mysqld)
|
||||
/usr/libexec/mariadb-wait-ready $MYSQLD_PID
|
||||
|
||||
mysql -fu root < /opt/hirs/scripts/common/db_create.sql.el7
|
||||
mysql -fu root < /opt/hirs/scripts/common/secure_mysql.sql
|
||||
|
||||
# Start tomcat
|
||||
/usr/libexec/tomcat/server start
|
Reference in New Issue
Block a user