Skip to content
Snippets Groups Projects
Commit 46d5099f authored by Bob Mottram's avatar Bob Mottram
Browse files

Allow mediagoblin registrations to be disabled

parent 58ba3aa6
No related branches found
No related tags found
No related merge requests found
......@@ -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"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment