diff --git a/src/freedombone-app-mediagoblin b/src/freedombone-app-mediagoblin index 1d0dfda0..f1ebd933 100755 --- a/src/freedombone-app-mediagoblin +++ b/src/freedombone-app-mediagoblin @@ -45,6 +45,7 @@ mediagoblin_variables=(ONION_ONLY MY_USERNAME MEDIAGOBLIN_DOMAIN_NAME MEDIAGOBLIN_CODE + DEFAULT_DOMAIN_NAME DDNS_PROVIDER) function install_interactive_mediagoblin { @@ -58,6 +59,27 @@ function install_interactive_mediagoblin { APP_INSTALLED=1 } +function configure_interactive_mediagoblin { + read_config_param 'MEDIAGOBLIN_DOMAIN_NAME' + MEDIAGOBLIN_BASE_DIR=/var/www/$MEDIAGOBLIN_DOMAIN_NAME/htdocs + + dialog --title $"Mediagoblin" \ + --backtitle $"Freedombone Control Panel" \ + --defaultno \ + --yesno $"\nAllow registration of new users?" 10 60 + sel=$? + case $sel in + 0) + sed -i 's|allow_registration.*|allow_registration = true|g' $MEDIAGOBLIN_BASE_DIR/mediagoblin/mediagoblin.ini + ;; + 1) + sed -i 's|allow_registration.*|allow_registration = false|g' $MEDIAGOBLIN_BASE_DIR/mediagoblin/mediagoblin.ini + ;; + 255) return;; + esac + systemctl restart mediagoblin +} + function change_password_mediagoblin { curr_username="$1" new_user_password="$2"