Update services.inc
This commit is contained in:
@@ -94,6 +94,17 @@ SERVICE_MGMT(){
|
|||||||
-nt|-nodetype) SERVICE['nodetype']=${2^^};;
|
-nt|-nodetype) SERVICE['nodetype']=${2^^};;
|
||||||
-a|-action) SERVICE['action']=${2,,};;
|
-a|-action) SERVICE['action']=${2,,};;
|
||||||
-q|-quiet) QUIET=1;;
|
-q|-quiet) QUIET=1;;
|
||||||
|
-h|-help)
|
||||||
|
echo -e "\nUsage: ${idsCL[Yellow]}[nodemgmt or nmg] ${idsCL[LightYellow]}service${idsCL[Default]} {"
|
||||||
|
width=35
|
||||||
|
printf "%-${width}s- %s\n" " -s|-service {service}" "Name of service to manage"
|
||||||
|
printf "%-${width}s- %s\n" " -n|-node {node-lan-ip}" "Node to run on"
|
||||||
|
printf "%-${width}s- %s\n" " -nt|-nodetype {nodetype}" "NodeType to run on, or all. Defaults to local nodetype"
|
||||||
|
printf "%-${width}s- %s\n" " -a|-action {action}" "Action to perform; start, stop, restart etc"
|
||||||
|
printf "%-${width}s- %s\n" " -q|-quiet" "Do not output, typically used from cron jobs"
|
||||||
|
echo -e "}\n"
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
if [ "${NM_SERVICE_DESC[${1}]}" != "" ]; then
|
if [ "${NM_SERVICE_DESC[${1}]}" != "" ]; then
|
||||||
SERVICE['service']=${1}
|
SERVICE['service']=${1}
|
||||||
@@ -107,19 +118,6 @@ SERVICE_MGMT(){
|
|||||||
elif [ "${1}" == "q" ]; then
|
elif [ "${1}" == "q" ]; then
|
||||||
QUIET=1
|
QUIET=1
|
||||||
|
|
||||||
else
|
|
||||||
echo
|
|
||||||
[ "${1}" != "-h" ] && echo -e "Invalid command\n"
|
|
||||||
echo -e "Usage: ${idsCL[Yellow]}[nodemgmt or nmg] ${idsCL[LightYellow]}service${idsCL[Default]} {"
|
|
||||||
width=35
|
|
||||||
printf "%-${width}s- %s\n" " -s|-service {service}" "Name of service to manage"
|
|
||||||
printf "%-${width}s- %s\n" " -n|-node {node-lan-ip}" "Node to run on"
|
|
||||||
printf "%-${width}s- %s\n" " -nt|-nodetype {nodetype}" "NodeType to run on, or all. Defaults to local nodetype"
|
|
||||||
printf "%-${width}s- %s\n" " -a|-action {action}" "Action to perform; start, stop, restart etc"
|
|
||||||
printf "%-${width}s- %s\n" " -q|-quiet" "Do not output, typically used from cron jobs"
|
|
||||||
echo -e "}\n"
|
|
||||||
exit 0
|
|
||||||
|
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|||||||
Reference in New Issue
Block a user