mirror of
https://github.com/nsacyber/HIRS.git
synced 2025-01-03 03:36:49 +00:00
Updated ACA Portal build.gradle [no ci]
Committer: iadgovuser26
This commit is contained in:
parent
dde6acc389
commit
eae9e37228
@ -149,7 +149,7 @@ ospackage {
|
||||
// /etc/hirs/certificates/private/ files are created by ssl_configure.sh
|
||||
// postInstall file('../package/scripts/common/firewall_configure_tomcat.sh')
|
||||
// postInstall file('../package/scripts/common/ssl_configure.sh')
|
||||
// postInstall file('../package/scripts/common/db_create.sh')
|
||||
postInstall file('../package/scripts/common/db_create.sh')
|
||||
// postInstall file('../package/scripts/aca/certificate_generate.sh')
|
||||
// postInstall 'if [ selinuxenabled ]; then semodule -i /opt/hirs/extras/aca/tomcat-mysql-hirs.pp; fi'
|
||||
|
||||
@ -159,6 +159,8 @@ ospackage {
|
||||
// Copy files to /tmp that package manager will be expecting them there
|
||||
preUninstall 'mkdir -p /tmp/aca/default-properties/'
|
||||
preUninstall 'cp /opt/hirs/default-properties/* /tmp/aca/default-properties/.'
|
||||
// postUninstall file(/opt/hirs/scripts/common/db_drop.sql)
|
||||
|
||||
|
||||
buildRpm.dependsOn ':HIRS_AttestationCA:war'
|
||||
|
||||
|
@ -10,22 +10,25 @@ fi
|
||||
|
||||
echo "Creating HIRS Database..."
|
||||
|
||||
if [ $DOCKER_CONTAINER = true ]; then
|
||||
# If in Docker container, avoid services that invoke the D-Bus
|
||||
# Check if mysql is already running, if not initialize
|
||||
if [[ $(pgrep -c -u mysql mysqld) -eq 0 ]]; then
|
||||
echo "running in a container..."
|
||||
# Check if running in a container
|
||||
if [ $DOCKER_CONTAINER = true ]; then
|
||||
# if in Docker container, avoid services that invoke the D-Bus
|
||||
echo "ACA is running in a container..."
|
||||
/usr/bin/mysql_install_db
|
||||
chown -R mysql:mysql /var/lib/mysql
|
||||
/usr/libexec/mysql-prepare-db-dir > /dev/null 2>&1
|
||||
chown -R mysql:mysql /var/lib/mysql/
|
||||
chown -R mysql:mysql /var/log/mariadb/
|
||||
nohup /usr/bin/mysqld_safe > /dev/null 2>&1 &
|
||||
fi
|
||||
else
|
||||
SQL_SERVICE=`/opt/hirs/scripts/common/get_db_service.sh`
|
||||
systemctl $SQL_SERVICE enable
|
||||
systemctl $SQL_SERVICE start
|
||||
fi
|
||||
|
||||
# Set intial password
|
||||
mysqladmin -u root password $DB_DEFAULT_PWD
|
||||
DB_CREATE_SCRIPT=/opt/hirs/scripts/common/db_create.sql.el7
|
||||
fi
|
||||
# Initialize the hirs_db database
|
||||
|
||||
DB_CREATE_SCRIPT=/opt/hirs/scripts/common/db_create.sql.el7
|
||||
mysql -u root --password="$DB_DEFAULT_PWD" < $DB_CREATE_SCRIPT
|
||||
|
Loading…
Reference in New Issue
Block a user