diff options
author | Evan Prodromou <evan@controlyourself.ca> | 2009-06-17 16:30:16 -0700 |
---|---|---|
committer | Evan Prodromou <evan@controlyourself.ca> | 2009-06-17 16:30:16 -0700 |
commit | 85b4c24188502ce3f8cef32cfba37ab91c8a648f (patch) | |
tree | 664a50f807bc7e2fca1c1e5fab98d00a5daa163b | |
parent | 2187ec7056a23e76c756f354bf41e3835ba8d103 (diff) |
add dbhost argument for status network setup
-rw-r--r-- | scripts/setup.cfg.sample | 1 | ||||
-rwxr-xr-x | scripts/setup_status_network.sh | 6 |
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'; |