Opening and closing friendica account registrations

This commit is contained in:
Bob Mottram 2017-04-07 15:52:10 +01:00
parent 5e3fed335e
commit e03a67f1e3
1 changed files with 19 additions and 3 deletions

View File

@ -128,6 +128,18 @@ function friendica_channel_directory_server {
esac
}
function friendica_close_registrations {
sed -i "s|REGISTER_OPEN|REGISTER_CLOSED|g" /var/www/$FRIENDICA_DOMAIN_NAME/htdocs/.htconfig.php
dialog --title $"Friendica Account Registrations" \
--msgbox $"New registrations are now closed" 6 40
}
function friendica_open_registrations {
sed -i "s|REGISTER_CLOSED|REGISTER_OPEN|g" /var/www/$FRIENDICA_DOMAIN_NAME/htdocs/.htconfig.php
dialog --title $"Friendica Account Registrations" \
--msgbox $"New registrations are permitted" 6 40
}
function configure_interactive_friendica {
while true
do
@ -135,10 +147,12 @@ function configure_interactive_friendica {
trap "rm -f $data" 0 1 2 5 15
dialog --backtitle $"Freedombone Control Panel" \
--title $"Friendica" \
--radiolist $"Choose an operation:" 13 70 4 \
--radiolist $"Choose an operation:" 15 70 6 \
1 $"Set channel directory server" off \
2 $"Renew SSL certificate" off \
3 $"Back to main menu" on 2> $data
3 $"Close new account registrations" off \
4 $"Open new account registrations" off \
5 $"Back to main menu" on 2> $data
sel=$?
case $sel in
1) break;;
@ -147,7 +161,9 @@ function configure_interactive_friendica {
case $(cat $data) in
1) friendica_channel_directory_server;;
2) friendica_renew_cert;;
3) break;;
3) friendica_close_registrations;;
4) friendica_open_registrations;;
5) break;;
esac
done
}