Set hubzilla channel directory server from the control panel
This commit is contained in:
parent
0ff52c44f5
commit
37732edba9
|
@ -10057,6 +10057,7 @@ quit" > $INSTALL_DIR/batch.sql
|
|||
chmod 600 /home/$MY_USERNAME/README
|
||||
fi
|
||||
|
||||
echo "Hubzilla domain:$HUBZILLA_DOMAIN_NAME" >> $COMPLETION_FILE
|
||||
echo 'install_hubzilla' >> $COMPLETION_FILE
|
||||
}
|
||||
|
||||
|
|
|
@ -460,6 +460,35 @@ function reset_tripwire {
|
|||
any_key
|
||||
}
|
||||
|
||||
function hubzilla_channel_directory_server {
|
||||
if ! grep -q "Hubzilla domain" $COMPLETION_FILE; then
|
||||
dialog --title "Hubzilla channel directory server" \
|
||||
--msgbox "Hubzilla is not installed on this system" 6 40
|
||||
return
|
||||
fi
|
||||
HUBZILLA_DOMAIN_NAME=$(cat $COMPLETION_FILE | grep "Hubzilla domain" | awk -F ':' '{print $2}')
|
||||
if [ ! -d /var/www/$HUBZILLA_DOMAIN_NAME ]; then
|
||||
dialog --title "Hubzilla channel directory server" \
|
||||
--msgbox "Hubzilla install directory not found" 6 40
|
||||
return
|
||||
fi
|
||||
|
||||
data=$(tempfile 2>/dev/null)
|
||||
trap "rm -f $data" 0 1 2 5 15
|
||||
dialog --title "Hubzilla channel directory server" \
|
||||
--backtitle "Freedombone Control Panel" \
|
||||
--inputbox "When you click on 'channel directory' this is where Hubzilla will obtain its list from" 8 60 2>$data
|
||||
sel=$?
|
||||
case $sel in
|
||||
0)
|
||||
hubzilla_domain_server=$(<$data)
|
||||
./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
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
function menu_backup_restore {
|
||||
while true
|
||||
do
|
||||
|
@ -555,15 +584,16 @@ function menu_top_level {
|
|||
trap "rm -f $data" 0 1 2 5 15
|
||||
dialog --backtitle "Freedombone Control Panel" \
|
||||
--title "Control Panel" \
|
||||
--radiolist "Choose an operation:" 15 70 8 \
|
||||
--radiolist "Choose an operation:" 16 70 9 \
|
||||
1 "Backup and Restore" off \
|
||||
2 "Show SIP Phone Extensions" off \
|
||||
3 "Logging on/off" off \
|
||||
4 "Manage Users" off \
|
||||
5 "Email Filtering Rules" off \
|
||||
6 "Security Settings" off \
|
||||
7 "Reset Tripwire" off \
|
||||
8 "Exit" on 2> $data
|
||||
3 "Reset Tripwire" off \
|
||||
4 "Logging on/off" off \
|
||||
5 "Manage Users" off \
|
||||
6 "Email Filtering Rules" off \
|
||||
7 "Security Settings" off \
|
||||
8 "Set Hubzilla channel directory server" off \
|
||||
9 "Exit" on 2> $data
|
||||
sel=$?
|
||||
case $sel in
|
||||
1) exit 1;;
|
||||
|
@ -572,12 +602,13 @@ function menu_top_level {
|
|||
case $(cat $data) in
|
||||
1) menu_backup_restore;;
|
||||
2) show_sip_extensions;;
|
||||
3) logging_on_off;;
|
||||
4) menu_users;;
|
||||
5) menu_email;;
|
||||
6) security_settings;;
|
||||
7) reset_tripwire;;
|
||||
8) break;;
|
||||
3) reset_tripwire;;
|
||||
4) logging_on_off;;
|
||||
5) menu_users;;
|
||||
6) menu_email;;
|
||||
7) security_settings;;
|
||||
8) hubzilla_channel_directory_server;;
|
||||
9) break;;
|
||||
esac
|
||||
done
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue