Skip to content
This repository has been archived by the owner on May 10, 2019. It is now read-only.

Commit

Permalink
add post-creation script to start and initialize mysql
Browse files Browse the repository at this point in the history
  • Loading branch information
lloyd committed May 31, 2012
1 parent 2035a99 commit 2967f3a
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .awsbox.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"poststart": "scripts/show_config.js"
},
"local_hooks": {
"postcreate": "scripts/awsbox/post_create.js"
"postcreate": "scripts/awsbox/post_create.sh"
},
"packages": [
"mysql-server"
Expand Down
3 changes: 3 additions & 0 deletions scripts/awsbox/create_browserid_user.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
CREATE USER 'browserid'@'localhost';
CREATE DATABASE browserid;
GRANT ALL ON browserid.* TO 'browserid'@'localhost';
Empty file removed scripts/awsbox/post_create.js
Empty file.
8 changes: 8 additions & 0 deletions scripts/awsbox/post_create.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/usr/bin/env bash

echo $(dirname "${BASH_SOURCE[0]}")/create_browserid_user.sql
exit 1

sudo /sbin/chkconfig mysqld on
sudo /sbin/service mysqld start
sudo mysql -u root < $(dirname "${BASH_SOURCE[0]}")/create_browserid_user.sql

0 comments on commit 2967f3a

Please sign in to comment.