summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/setup.cfg.sample1
-rwxr-xr-xscripts/setup_status_network.sh6
2 files changed, 4 insertions, 3 deletions
diff --git a/scripts/setup.cfg.sample b/scripts/setup.cfg.sample
index 4194bc146..450b9c30a 100644
--- a/scripts/setup.cfg.sample
+++ b/scripts/setup.cfg.sample
@@ -2,6 +2,7 @@
# Base database name; full name will include nickname
+export DBHOST=masterdb.example.net
export DBBASE=_example_net
export USERBASE=_example_net
export ADMIN=root
diff --git a/scripts/setup_status_network.sh b/scripts/setup_status_network.sh
index d80612b94..e1d14593f 100755
--- a/scripts/setup_status_network.sh
+++ b/scripts/setup_status_network.sh
@@ -11,13 +11,13 @@ export username=$nickname$USERBASE
# Create the db
-mysqladmin -u $ADMIN --password=$ADMINPASS create $database
+mysqladmin -h $DBHOST -u $ADMIN --password=$ADMINPASS create $database
for f in laconica.sql sms_carrier.sql foreign_services.sql notice_source.sql; do
- mysql -u $ADMIN --password=$ADMINPASS $database < ../db/$f;
+ mysql -h $DBHOST -u $ADMIN --password=$ADMINPASS $database < ../db/$f;
done
-mysql -u $ADMIN --password=$ADMINPASS $SITEDB << ENDOFCOMMANDS
+mysql -h $DBHOST -u $ADMIN --password=$ADMINPASS $SITEDB << ENDOFCOMMANDS
GRANT INSERT,SELECT,UPDATE,DELETE ON $database.* TO '$username'@'localhost' IDENTIFIED BY '$password';
GRANT INSERT,SELECT,UPDATE,DELETE ON $database.* TO '$username'@'%' IDENTIFIED BY '$password';