summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorEvan Prodromou <evan@controlyourself.ca>2009-06-17 16:30:16 -0700
committerEvan Prodromou <evan@controlyourself.ca>2009-06-17 16:30:16 -0700
commit85b4c24188502ce3f8cef32cfba37ab91c8a648f (patch)
tree664a50f807bc7e2fca1c1e5fab98d00a5daa163b /scripts
parent2187ec7056a23e76c756f354bf41e3835ba8d103 (diff)
add dbhost argument for status network setup
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';