diff --git a/linuxinstall/shell/nmsagent.sh b/linuxinstall/shell/nmsagent.sh index 385a424..1d7b530 100644 --- a/linuxinstall/shell/nmsagent.sh +++ b/linuxinstall/shell/nmsagent.sh @@ -195,6 +195,17 @@ if [ "$1" = "start" ] ; then fi handleTask fi +elif [ "$1" = "boot-up" ]; then + #设置开机自启动 + if [ -z "$(cat /etc/rc.local|grep -E "^\s*$NMSCLEINT_HOME/shell/startup.sh")" ] + then + echo "">> /etc/rc.local + echo "########## nmsclient开机启动 ###########" >> /etc/rc.local + echo $NMSCLEINT_HOME"/shell/startup.sh" >> /etc/rc.local + echo "Boot-up settings complete!" + else + echo "Boot-up has been set up without modification." + fi elif [ "$1" = "stop" ]; then getPid if [ -n "$proc_id" ]