optimize(master : nicsensor.sh) update to 1.9.2
优化 help 显示功能
This commit is contained in:
parent
559263cc2d
commit
952f281365
@ -1,5 +1,5 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
SCRIPT_VERSION="1.9.1"
|
SCRIPT_VERSION="1.9.2"
|
||||||
# ---------------------------------------------------------
|
# ---------------------------------------------------------
|
||||||
# Project Feature Varible (Change if need)
|
# Project Feature Varible (Change if need)
|
||||||
# ---------------------------------------------------------
|
# ---------------------------------------------------------
|
||||||
@ -482,6 +482,9 @@ pre_exec_hook(){
|
|||||||
if [ "$Param1" = "help" ] && [ $param_num -eq 2 ];then
|
if [ "$Param1" = "help" ] && [ $param_num -eq 2 ];then
|
||||||
print_usage $Param2
|
print_usage $Param2
|
||||||
exit 0
|
exit 0
|
||||||
|
elif [ "$Param1" = "help" ] && [ $param_num -gt 2 ];then
|
||||||
|
print_usage_guide
|
||||||
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$Param1" = "get" ] || [ "$Param1" = "set" ];then
|
if [ "$Param1" = "get" ] || [ "$Param1" = "set" ];then
|
||||||
@ -493,6 +496,7 @@ pre_exec_hook(){
|
|||||||
# if in debug mode, skip this check
|
# if in debug mode, skip this check
|
||||||
if [ "$server_type" = "auto" ] && [ $DEBUG_MODE -eq 0 ];then
|
if [ "$server_type" = "auto" ] && [ $DEBUG_MODE -eq 0 ];then
|
||||||
try_get_server_type
|
try_get_server_type
|
||||||
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# is param legel?
|
# is param legel?
|
||||||
@ -1680,7 +1684,7 @@ if [ "$1" = "detect" ];then
|
|||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
if [ $param_num -le 2 ];then
|
if [ $param_num -le 2 ];then
|
||||||
print_usage_guide
|
print_usage "all"
|
||||||
else
|
else
|
||||||
start_get_sensor
|
start_get_sensor
|
||||||
fi
|
fi
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user