menu headers

pull/12/head
Tom Early 7 years ago
parent c4a887b85a
commit a8aefea1c8

@ -166,12 +166,23 @@ GetModuleProcess () {
fi fi
} }
Header () {
local count
count=$( ps -aux | grep qn | wc -l )
if [ $count -gt 1 ]; then
echo
echo "USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND"
ps -aux | grep qn | head --line=-1
fi
echo
}
LogMenu () { LogMenu () {
ans='' ans=''
while [[ "$ans" != q* ]]; do while [[ "$ans" != q* ]]; do
clear clear
echo " Log Menu" echo " Log Menu"
echo Header
echo "After starting a log, use <Ctrl>+C to stop the log and return to this menu." echo "After starting a log, use <Ctrl>+C to stop the log and return to this menu."
echo echo
if [[ $GateState == 'running' ]]; then if [[ $GateState == 'running' ]]; then
@ -244,7 +255,7 @@ MaintenanceMenu () {
while [[ "$ans" != q* ]]; do while [[ "$ans" != q* ]]; do
clear clear
echo " MaintenanceMenu" echo " MaintenanceMenu"
echo Header
if [[ "$GateState" == 'running' ]]; then if [[ "$GateState" == 'running' ]]; then
echo " g : Stop QnetGateway" echo " g : Stop QnetGateway"
elif [[ "$GateState" == 'stopped' ]]; then elif [[ "$GateState" == 'stopped' ]]; then
@ -392,7 +403,7 @@ while [[ "$ans" != q* ]]; do
clear clear
echo echo
echo " Qnet Administration Menu" echo " Qnet Administration Menu"
echo Header
BaseStatus BaseStatus
ModuleStatus 0 a "$module_a" ModuleStatus 0 a "$module_a"
ModuleStatus 1 b "$module_b" ModuleStatus 1 b "$module_b"

Loading…
Cancel
Save

Powered by TurnKey Linux.