Validation of domain server

This commit is contained in:
Bob Mottram 2015-11-03 12:30:28 +00:00
parent 37732edba9
commit 108aa7831b
1 changed files with 8 additions and 0 deletions

View File

@ -482,6 +482,14 @@ function hubzilla_channel_directory_server {
case $sel in
0)
hubzilla_domain_server=$(<$data)
if [[ $hubzilla_domain_server != *"."* ]]; then
return
fi
if [[ $hubzilla_domain_server != "https"* ]]; then
dialog --title "Hubzilla channel directory server" \
--msgbox "Invalid domain - include the https://" 6 40
return
fi
./var/www/$HUBZILLA_DOMAIN_NAME/htdocs/util/config system directory_server $hubzilla_domain_server
dialog --title "Hubzilla channel directory server" \
--msgbox "Domain channel directory server changed to $hubzilla_domain_server" 6 40