From 6b3c7bd2789651f0dc9de80b1b7d44594af52637 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Tue, 29 Mar 2016 22:33:01 +0100 Subject: [PATCH] Tidying --- src/freedombone | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/src/freedombone b/src/freedombone index 8dd821fa..96b2c5b8 100755 --- a/src/freedombone +++ b/src/freedombone @@ -1070,7 +1070,7 @@ function read_configuration { # Ensure that a copy of the config exists for upgrade purposes if [[ $CONFIGURATION_FILE != "/root/${PROJECT_NAME}.cfg" ]]; then cp $CONFIGURATION_FILE /root/${PROJECT_NAME}.cfg - fi + fi if grep -q "VOIP_TURN_PORT" $CONFIGURATION_FILE; then VOIP_TURN_PORT=$(grep "VOIP_TURN_PORT" $CONFIGURATION_FILE | awk -F '=' '{print $2}') fi @@ -9601,7 +9601,7 @@ function install_mediagoblin { if [ ! -d $MEDIAGOBLIN_WORKING_DIRECTORY ]; then mkdir -p $MEDIAGOBLIN_WORKING_DIRECTORY - fi + fi git_clone $MEDIAGOBLIN_REPO $MEDIAGOBLIN_WORKING_DIRECTORY cd $MEDIAGOBLIN_WORKING_DIRECTORY @@ -9611,17 +9611,17 @@ function install_mediagoblin { if [ ! "$?" = "0" ]; then exit 278826 fi - + ./configure --with-python3 --without-virtualenv if [ ! "$?" = "0" ]; then exit 462826 fi - + make if [ ! "$?" = "0" ]; then exit 738229 fi - + if [ ! -d $MEDIAGOBLIN_WORKING_DIRECTORY/user_dev ]; then mkdir $MEDIAGOBLIN_WORKING_DIRECTORY/user_dev fi @@ -9638,14 +9638,14 @@ function install_mediagoblin { echo $'paste.ini not found' exit 52762 fi - + cp -av mediagoblin.ini mediagoblin_local.ini cp -av paste.ini paste_local.ini # TODO configure ini files chown -hR mediagoblin:www-data $MEDIAGOBLIN_WORKING_DIRECTORY - + # init with systemd echo '[Unit]' > /etc/systemd/system/mediagoblin.service echo 'Description=Mediagoblin (Media Server)' >> /etc/systemd/system/mediagoblin.service @@ -9667,7 +9667,7 @@ function install_mediagoblin { systemctl daemon-reload systemctl enable mediagoblin systemctl start mediagoblin - + # web config MEDIAGOBLIN_VIRTUAL_HOST=/etc/nginx/sites-available/$MEDIAGOBLIN_DOMAIN_NAME echo 'server {' > $MEDIAGOBLIN_VIRTUAL_HOST @@ -9748,7 +9748,7 @@ function install_mediagoblin { # update the dynamic DNS CURRENT_DDNS_DOMAIN=$MEDIAGOBLIN_DOMAIN_NAME add_ddns_domain - + echo 'install_mediagoblin' >> $COMPLETION_FILE } @@ -10442,7 +10442,7 @@ function install_sip_turn { fi fi fi - + echo '##' > /etc/turnserver/turnserver.conf echo '# TurnServer configuration file.' >> /etc/turnserver/turnserver.conf echo '#' >> /etc/turnserver/turnserver.conf @@ -10539,12 +10539,12 @@ function install_sip_turn { echo '## Certification Authority file.' >> /etc/turnserver/turnserver.conf echo "ca_file = \"/etc/ssl/certs/ca-certificates.crt\"" >> /etc/turnserver/turnserver.conf echo '' >> /etc/turnserver/turnserver.conf - echo '## Server certificate file.' >> /etc/turnserver/turnserver.conf + echo '## Server certificate file.' >> /etc/turnserver/turnserver.conf if [ -f /etc/ssl/certs/$DEFAULT_DOMAIN_NAME.pem ]; then echo "cert_file = \"/etc/ssl/certs/$DEFAULT_DOMAIN_NAME.pem\"" >> /etc/turnserver/turnserver.conf else if [ -f /etc/ssl/certs/$DEFAULT_DOMAIN_NAME.crt ]; then - echo "cert_file = \"/etc/ssl/certs/$DEFAULT_DOMAIN_NAME.crt\"" >> /etc/turnserver/turnserver.conf + echo "cert_file = \"/etc/ssl/certs/$DEFAULT_DOMAIN_NAME.crt\"" >> /etc/turnserver/turnserver.conf fi fi echo '' >> /etc/turnserver/turnserver.conf @@ -10561,7 +10561,7 @@ function install_sip_turn { echo 'mod_tmpuser = false' >> /etc/turnserver/turnserver.conf echo "${MY_USERNAME}:password:${DEFAULT_DOMAIN_NAME}:authorized" > /etc/turnserver/turnusers.txt - + systemctl restart turnserver echo 'install_sip_turn' >> $COMPLETION_FILE