mirror of
https://github.com/nsacyber/HIRS.git
synced 2025-01-22 04:18:20 +00:00
changed ownership of mysql files
This commit is contained in:
parent
8493a47495
commit
dde6acc389
@ -14,6 +14,8 @@ if [ $DOCKER_CONTAINER = true ]; then
|
|||||||
# If in Docker container, avoid services that invoke the D-Bus
|
# If in Docker container, avoid services that invoke the D-Bus
|
||||||
if [[ $(pgrep -c -u mysql mysqld) -eq 0 ]]; then
|
if [[ $(pgrep -c -u mysql mysqld) -eq 0 ]]; then
|
||||||
echo "running in a container..."
|
echo "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
|
/usr/libexec/mysql-prepare-db-dir > /dev/null 2>&1
|
||||||
nohup /usr/bin/mysqld_safe > /dev/null 2>&1 &
|
nohup /usr/bin/mysqld_safe > /dev/null 2>&1 &
|
||||||
fi
|
fi
|
||||||
@ -27,8 +29,3 @@ mysqladmin -u root password $DB_DEFAULT_PWD
|
|||||||
DB_CREATE_SCRIPT=/opt/hirs/scripts/common/db_create.sql.el7
|
DB_CREATE_SCRIPT=/opt/hirs/scripts/common/db_create.sql.el7
|
||||||
|
|
||||||
mysql -u root --password="$DB_DEFAULT_PWD" < $DB_CREATE_SCRIPT
|
mysql -u root --password="$DB_DEFAULT_PWD" < $DB_CREATE_SCRIPT
|
||||||
|
|
||||||
// Set logfile for
|
|
||||||
#echo '[mysqld]' >> /etc/my.cnf
|
|
||||||
#echo 'log-error=/var/log/mariadb/hirs_db.log' >> /etc/my.cnf
|
|
||||||
|
|
||||||
|
@ -24,7 +24,7 @@ else
|
|||||||
fi
|
fi
|
||||||
if [ -f /.dockerenv ]; then
|
if [ -f /.dockerenv ]; then
|
||||||
echo "in a container..."
|
echo "in a container..."
|
||||||
./opt/tomcat/tomcat/bin/catalina.sh
|
sh /opt/tomcat/bin/catalina.sh start
|
||||||
else
|
else
|
||||||
cp /opt/hirs/scripts/aca/tomcat.service /etc/systemd/system/.
|
cp /opt/hirs/scripts/aca/tomcat.service /etc/systemd/system/.
|
||||||
systemctl daemon-reload
|
systemctl daemon-reload
|
||||||
|
Loading…
Reference in New Issue
Block a user