From 8f6c0ab94436c409d11fd54fc5c782dd80efad71 Mon Sep 17 00:00:00 2001 From: zeus Date: Sun, 2 Jan 2022 01:03:51 +0200 Subject: [PATCH] add --- install/usr/share/swarmlab.io/sec/sec_bootstrapmysql | 3 +++ install/usr/share/swarmlab.io/sec/swarmlab-sec | 1 + 2 files changed, 4 insertions(+) diff --git a/install/usr/share/swarmlab.io/sec/sec_bootstrapmysql b/install/usr/share/swarmlab.io/sec/sec_bootstrapmysql index 739dfac..fe27f82 100755 --- a/install/usr/share/swarmlab.io/sec/sec_bootstrapmysql +++ b/install/usr/share/swarmlab.io/sec/sec_bootstrapmysql @@ -73,6 +73,9 @@ case $ROLE in chmod 644 /etc/mysql/mysql.conf.d/mysqld.cnf mysqld --user=root mysql -e "create database $MYSQL_DATABASE ; GRANT ALL PRIVILEGES ON $MYSQL_DATABASE.* TO $MYSQL_USER@localhost IDENTIFIED BY '$MYSQL_PASSWORD'" + mysql exampledb -e "UPDATE wp_options SET option_name = 'siteurl', option_value = 'http://localhost:$SERVICEPORT', autoload = 'yes' WHERE option_name = 'siteurl' " + + mysql exampledb -e "UPDATE wp_options SET option_name = 'home', option_value = 'http://localhost:$SERVICEPORT', autoload = 'yes' WHERE option_name = 'home' " tail -f /dev/null #done ;; diff --git a/install/usr/share/swarmlab.io/sec/swarmlab-sec b/install/usr/share/swarmlab.io/sec/swarmlab-sec index 1bed070..3663d88 100755 --- a/install/usr/share/swarmlab.io/sec/swarmlab-sec +++ b/install/usr/share/swarmlab.io/sec/swarmlab-sec @@ -318,6 +318,7 @@ services: environment: - NODENAME=${NODENAME} - NODENETWORK=${NODENETWORK} + - SERVICEPORT=\${R_PORT2} - DISPLAY=\${DISPLAY} - MYSQL_DATABASE=exampledb - MYSQL_USER=exampleuser