Skip to content

Commit

Permalink
update nginx conf in initial.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
fuji246 committed Jun 25, 2017
1 parent 9610ff0 commit 71b0d7f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion bbb_django/initial.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
#!/bin/bash
`which python` manage.py syncdb
`which python` manage.py schemamigration bbb --initial
echo 'updating "SALT" and "BBB_API_URL" in "bbb/local_settings.py"'
echo 'update "SALT" and "BBB_API_URL" in "bbb/local_settings.py"'

OUTPUT=(`bbb-conf --salt`)
BBB_API_URL=${OUTPUT[1]}
SALT=${OUTPUT[3]}
sed -i "s|SALT = \"\"|SALT=\"${SALT}\"|g" bbb/local_settings.py
sed -i "s|BBB_API_URL = \"\"|BBB_API_URL = \"${BBB_API_URL}\"|g" bbb/local_settings.py

echo 'update nginx conf file'
HOST=`echo $BBB_API_URL | sed -n 's/http:\/\/\(.*\)\/bigbluebutton\//\1/p'`
sed -i "s|www.yourhost.com|${HOST}|g" bigbluebutton.nginx
#use manage.py convert_to_south myapp to convert the old app

0 comments on commit 71b0d7f

Please sign in to comment.