Selaa lähdekoodia

Notify that logging changes take a while

Bob Mottram 9 vuotta sitten
vanhempi
commit
e8c32454e2
1 muutettua tiedostoa jossa 16 lisäystä ja 7 poistoa
  1. 16
    7
      src/freedombone-controlpanel

+ 16
- 7
src/freedombone-controlpanel Näytä tiedosto

97
             echo $(echo "$ext" | awk -F '>' '{print $2}' | awk -F '<' '{print $1}')
97
             echo $(echo "$ext" | awk -F '>' '{print $2}' | awk -F '<' '{print $1}')
98
         fi
98
         fi
99
     done < $SIP_CONFIG_FILE
99
     done < $SIP_CONFIG_FILE
100
-    any_key 
100
+    any_key
101
 }
101
 }
102
 
102
 
103
 function select_user {
103
 function select_user {
147
     if [ ${#ADMIN} -lt 2 ]; then
147
     if [ ${#ADMIN} -lt 2 ]; then
148
         dialog --title "Administrator user" \
148
         dialog --title "Administrator user" \
149
                --msgbox "Username not found" 6 40
149
                --msgbox "Username not found" 6 40
150
-        return      
150
+        return
151
     fi
151
     fi
152
     if [ ! -d /home/$ADMIN_USER ]; then
152
     if [ ! -d /home/$ADMIN_USER ]; then
153
         dialog --title "Administrator user" \
153
         dialog --title "Administrator user" \
470
             restorefromfriend $friend_server_domain_name
470
             restorefromfriend $friend_server_domain_name
471
             any_key
471
             any_key
472
             ;;
472
             ;;
473
-    esac        
473
+    esac
474
 }
474
 }
475
 
475
 
476
 function logging_on_off {
476
 function logging_on_off {
477
+    logging="no"
477
     dialog --title "Logging" \
478
     dialog --title "Logging" \
478
            --backtitle "Freedombone Control Panel" \
479
            --backtitle "Freedombone Control Panel" \
479
            --yesno "\nDo you want to turn logging on?" 7 60
480
            --yesno "\nDo you want to turn logging on?" 7 60
480
     sel=$?
481
     sel=$?
481
     case $sel in
482
     case $sel in
482
-        0) freedombone-logging on;;
483
-        1) freedombone-logging off;;
483
+        0) logging="yes";;
484
         255) return;;
484
         255) return;;
485
     esac
485
     esac
486
+
487
+    clear
488
+    echo ''
489
+    echo 'This may take a few seconds. Please wait...'
490
+    if [[ $logging == "no" ]]; then
491
+        freedombone-logging off
492
+    else
493
+        freedombone-logging on
494
+    fi
486
 }
495
 }
487
 
496
 
488
 function restore_gpg_key {
497
 function restore_gpg_key {
546
             dialog --title "Hubzilla channel directory server" \
555
             dialog --title "Hubzilla channel directory server" \
547
                    --msgbox "Domain channel directory server changed to $hubzilla_domain_server" 6 40
556
                    --msgbox "Domain channel directory server changed to $hubzilla_domain_server" 6 40
548
             ;;
557
             ;;
549
-    esac       
558
+    esac
550
 }
559
 }
551
 
560
 
552
 function format_drive {
561
 function format_drive {
553
-    drive=    
562
+    drive=
554
     data=$(tempfile 2>/dev/null)
563
     data=$(tempfile 2>/dev/null)
555
     trap "rm -f $data" 0 1 2 5 15
564
     trap "rm -f $data" 0 1 2 5 15
556
     dialog --backtitle "Freedombone Control Panel" \
565
     dialog --backtitle "Freedombone Control Panel" \