Mediagoblin tweaks

This commit is contained in:
Bob Mottram 2015-03-25 22:45:54 +00:00
parent b3bcde5f70
commit e1e8b3772c
1 changed files with 11 additions and 3 deletions

View File

@ -8369,8 +8369,9 @@ function install_mediagoblin {
apt-get -y install git-core python python-dev python-lxml python-imaging python-virtualenv apt-get -y install git-core python python-dev python-lxml python-imaging python-virtualenv
apt-get -y install postgresql postgresql-client python-psycopg2 apt-get -y install postgresql postgresql-client python-psycopg2
apt-get -y install python-gst-1.0 libjpeg62-turbo-dev gstreamer1.0-plugins-base python-gobject apt-get -y install python-gst-1.0 libjpeg62-turbo-dev gstreamer1.0-plugins-base python-gobject
apt-get -y install gstreamer1.0-plugins-bad gstreamer1.0-plugins-good gstreamer1.0-libav apt-get -y install gstreamer1.0-plugins-good gstreamer1.0-libav libav-tools gstreamer0.10-tools
apt-get -y install python-numpy python-scipy libsndfile1-dev python-gst0.10-dev apt-get -y install python-numpy python-scipy libsndfile1-dev python-gst0.10-dev
apt-get -y install gstreamer0.10-plugins-base gstreamer0.10-plugins-good gstreamer1.0-tools
su -c "createuser -A -D mediagoblin" - postgres su -c "createuser -A -D mediagoblin" - postgres
su -c "createdb -E UNICODE -O mediagoblin mediagoblin" - postgres su -c "createdb -E UNICODE -O mediagoblin mediagoblin" - postgres
adduser --disabled-login --gecos 'Mediagoblin' mediagoblin adduser --disabled-login --gecos 'Mediagoblin' mediagoblin
@ -8401,6 +8402,7 @@ function install_mediagoblin {
fi fi
sed -i 's|# sql_engine.*|sql_engine = postgresql:///mediagoblin|g' $MEDIAGOBLIN_PATH/mediagoblin_local.ini sed -i 's|# sql_engine.*|sql_engine = postgresql:///mediagoblin|g' $MEDIAGOBLIN_PATH/mediagoblin_local.ini
sed -i "s/email_sender_address.*/email_sender_address = \"$MY_EMAIL_ADDRESS\"/g" $MEDIAGOBLIN_PATH/mediagoblin_local.ini sed -i "s/email_sender_address.*/email_sender_address = \"$MY_EMAIL_ADDRESS\"/g" $MEDIAGOBLIN_PATH/mediagoblin_local.ini
sed -i 's|email_debug_mode.*|email_debug_mode = false|g' $MEDIAGOBLIN_PATH/mediagoblin_local.ini
# add extra media types # add extra media types
if ! grep -q "media_types.stl" $MEDIAGOBLIN_PATH/mediagoblin_local.ini; then if ! grep -q "media_types.stl" $MEDIAGOBLIN_PATH/mediagoblin_local.ini; then
@ -8413,6 +8415,8 @@ function install_mediagoblin {
echo '[[mediagoblin.media_types.video]]' >> $MEDIAGOBLIN_PATH/mediagoblin_local.ini echo '[[mediagoblin.media_types.video]]' >> $MEDIAGOBLIN_PATH/mediagoblin_local.ini
fi fi
#su -c 'cd $MEDIAGOBLIN_PATH; ./bin/pip install scikits.audiolab' - mediagoblin
#su -c "cd $MEDIAGOBLIN_PATH; git submodule update && ./bin/python setup.py develop --upgrade && ./bin/gmg dbupdate" - mediagoblin #su -c "cd $MEDIAGOBLIN_PATH; git submodule update && ./bin/python setup.py develop --upgrade && ./bin/gmg dbupdate" - mediagoblin
su -c "cd $MEDIAGOBLIN_PATH; ./bin/gmg dbupdate" - mediagoblin su -c "cd $MEDIAGOBLIN_PATH; ./bin/gmg dbupdate" - mediagoblin
@ -8427,10 +8431,13 @@ function install_mediagoblin {
echo ' location / {' >> /etc/nginx/sites-available/$MEDIAGOBLIN_DOMAIN_NAME echo ' location / {' >> /etc/nginx/sites-available/$MEDIAGOBLIN_DOMAIN_NAME
echo ' proxy_pass http://localhost:6543;' >> /etc/nginx/sites-available/$MEDIAGOBLIN_DOMAIN_NAME echo ' proxy_pass http://localhost:6543;' >> /etc/nginx/sites-available/$MEDIAGOBLIN_DOMAIN_NAME
echo ' }' >> /etc/nginx/sites-available/$MEDIAGOBLIN_DOMAIN_NAME echo ' }' >> /etc/nginx/sites-available/$MEDIAGOBLIN_DOMAIN_NAME
echo ' location ^~ /user/ {' >> /etc/nginx/sites-available/$MEDIAGOBLIN_DOMAIN_NAME echo ' location ^~ /auth/ {' >> /etc/nginx/sites-available/$MEDIAGOBLIN_DOMAIN_NAME
echo ' rewrite ^ https://$server_name$request_uri?;' >> /etc/nginx/sites-available/$MEDIAGOBLIN_DOMAIN_NAME echo ' rewrite ^ https://$server_name$request_uri?;' >> /etc/nginx/sites-available/$MEDIAGOBLIN_DOMAIN_NAME
echo ' }' >> /etc/nginx/sites-available/$MEDIAGOBLIN_DOMAIN_NAME echo ' }' >> /etc/nginx/sites-available/$MEDIAGOBLIN_DOMAIN_NAME
echo ' location ^~ /admin/ {' >> /etc/nginx/sites-available/$MEDIAGOBLIN_DOMAIN_NAME echo ' location ^~ /u/ {' >> /etc/nginx/sites-available/$MEDIAGOBLIN_DOMAIN_NAME
echo ' rewrite ^ https://$server_name$request_uri?;' >> /etc/nginx/sites-available/$MEDIAGOBLIN_DOMAIN_NAME
echo ' }' >> /etc/nginx/sites-available/$MEDIAGOBLIN_DOMAIN_NAME
echo ' location ^~ /submit/ {' >> /etc/nginx/sites-available/$MEDIAGOBLIN_DOMAIN_NAME
echo ' rewrite ^ https://$server_name$request_uri?;' >> /etc/nginx/sites-available/$MEDIAGOBLIN_DOMAIN_NAME echo ' rewrite ^ https://$server_name$request_uri?;' >> /etc/nginx/sites-available/$MEDIAGOBLIN_DOMAIN_NAME
echo ' }' >> /etc/nginx/sites-available/$MEDIAGOBLIN_DOMAIN_NAME echo ' }' >> /etc/nginx/sites-available/$MEDIAGOBLIN_DOMAIN_NAME
echo '}' >> /etc/nginx/sites-available/$MEDIAGOBLIN_DOMAIN_NAME echo '}' >> /etc/nginx/sites-available/$MEDIAGOBLIN_DOMAIN_NAME
@ -8484,6 +8491,7 @@ function install_mediagoblin {
nginx_ensite $MEDIAGOBLIN_DOMAIN_NAME nginx_ensite $MEDIAGOBLIN_DOMAIN_NAME
service php5-fpm restart service php5-fpm restart
service nginx restart service nginx restart
/usr/sbin/nginx -s reload
# update the dynamic DNS # update the dynamic DNS
CURRENT_DDNS_DOMAIN=$MEDIAGOBLIN_DOMAIN_NAME CURRENT_DDNS_DOMAIN=$MEDIAGOBLIN_DOMAIN_NAME