|
@@ -45,6 +45,7 @@ mediagoblin_variables=(ONION_ONLY
|
45
|
45
|
MY_USERNAME
|
46
|
46
|
MEDIAGOBLIN_DOMAIN_NAME
|
47
|
47
|
MEDIAGOBLIN_CODE
|
|
48
|
+ DEFAULT_DOMAIN_NAME
|
48
|
49
|
DDNS_PROVIDER)
|
49
|
50
|
|
50
|
51
|
function install_interactive_mediagoblin {
|
|
@@ -58,6 +59,27 @@ function install_interactive_mediagoblin {
|
58
|
59
|
APP_INSTALLED=1
|
59
|
60
|
}
|
60
|
61
|
|
|
62
|
+function configure_interactive_mediagoblin {
|
|
63
|
+ read_config_param 'MEDIAGOBLIN_DOMAIN_NAME'
|
|
64
|
+ MEDIAGOBLIN_BASE_DIR=/var/www/$MEDIAGOBLIN_DOMAIN_NAME/htdocs
|
|
65
|
+
|
|
66
|
+ dialog --title $"Mediagoblin" \
|
|
67
|
+ --backtitle $"Freedombone Control Panel" \
|
|
68
|
+ --defaultno \
|
|
69
|
+ --yesno $"\nAllow registration of new users?" 10 60
|
|
70
|
+ sel=$?
|
|
71
|
+ case $sel in
|
|
72
|
+ 0)
|
|
73
|
+ sed -i 's|allow_registration.*|allow_registration = true|g' $MEDIAGOBLIN_BASE_DIR/mediagoblin/mediagoblin.ini
|
|
74
|
+ ;;
|
|
75
|
+ 1)
|
|
76
|
+ sed -i 's|allow_registration.*|allow_registration = false|g' $MEDIAGOBLIN_BASE_DIR/mediagoblin/mediagoblin.ini
|
|
77
|
+ ;;
|
|
78
|
+ 255) return;;
|
|
79
|
+ esac
|
|
80
|
+ systemctl restart mediagoblin
|
|
81
|
+}
|
|
82
|
+
|
61
|
83
|
function change_password_mediagoblin {
|
62
|
84
|
curr_username="$1"
|
63
|
85
|
new_user_password="$2"
|