More MaintenanceMenu bugs

pull/12/head
Tom Early 7 years ago
parent f4edd36269
commit 087a839285

@ -235,7 +235,7 @@ LogMenu () {
sudo journalctl -u $process -f sudo journalctl -u $process -f
fi fi
done done
ans= ans=''
} }
MaintenanceMenu () { MaintenanceMenu () {
@ -286,18 +286,21 @@ MaintenanceMenu () {
elif [[ "$GateState" == 'stopped' ]]; then elif [[ "$GateState" == 'stopped' ]]; then
sudo systemctl start qngateway sudo systemctl start qngateway
fi fi
BaseStatus
elif [[ "$ans" == l* ]]; then elif [[ "$ans" == l* ]]; then
if [[ "$LinkState" == 'running' ]]; then if [[ "$LinkState" == 'running' ]]; then
sudo systemctl stop qnlink sudo systemctl stop qnlink
elif [[ "$LinkState" == 'stopped' ]]; then elif [[ "$LinkState" == 'stopped' ]]; then
sudo systemctl start qnlink sudo systemctl start qnlink
fi fi
BaseStatus
elif [[ "$ans" == d* ]]; then elif [[ "$ans" == d* ]]; then
if [[ "$DTMFState" == 'running' ]]; then if [[ "$DTMFState" == 'running' ]]; then
sudo systemctl stop qndtmf sudo systemctl stop qndtmf
elif [[ "$DTMFState" == 'stopped' ]]; then elif [[ "$DTMFState" == 'stopped' ]]; then
sudo systemctl start qndtmf sudo systemctl start qndtmf
fi fi
BaseStatus
elif [[ "$ans" == a* ]] && [ -n $module_a ]; then elif [[ "$ans" == a* ]] && [ -n $module_a ]; then
GetModuleProcess $module_a GetModuleProcess $module_a
if [[ "${ModuleState[0]}" == 'running' ]]; then if [[ "${ModuleState[0]}" == 'running' ]]; then
@ -305,7 +308,7 @@ MaintenanceMenu () {
elif [[ "${ModuleState[0]}" == 'stopped' ]]; then elif [[ "${ModuleState[0]}" == 'stopped' ]]; then
sudo systemctl start $process sudo systemctl start $process
fi fi
ModuleState 0 a $module_a ModuleStatus 0 a $module_a
elif [[ "$ans" == b* ]] && [ -n $module_b ]; then elif [[ "$ans" == b* ]] && [ -n $module_b ]; then
GetModuleProcess $module_b GetModuleProcess $module_b
if [[ "${ModuleState[1]}" == 'running' ]]; then if [[ "${ModuleState[1]}" == 'running' ]]; then
@ -313,7 +316,7 @@ MaintenanceMenu () {
elif [[ "${ModuleState[1]}" == 'stopped' ]]; then elif [[ "${ModuleState[1]}" == 'stopped' ]]; then
sudo systemctl start $process sudo systemctl start $process
fi fi
ModuleState 1 b $module_b ModuleStatus 1 b $module_b
elif [[ "$ans" == c* ]] && [ -n $module_c ]; then elif [[ "$ans" == c* ]] && [ -n $module_c ]; then
GetModuleProcess $module_c GetModuleProcess $module_c
if [[ "${ModuleState[2]}" == 'running' ]]; then if [[ "${ModuleState[2]}" == 'running' ]]; then
@ -321,9 +324,8 @@ MaintenanceMenu () {
elif [[ "${ModuleState[2]}" == 'stopped' ]]; then elif [[ "${ModuleState[2]}" == 'stopped' ]]; then
sudo systemctl start $process sudo systemctl start $process
fi fi
ModuleState 2 c $module_c ModuleStatus 2 c $module_c
fi fi
BaseStatus
done done
ans='' ans=''
} }

Loading…
Cancel
Save

Powered by TurnKey Linux.