脚本中增加开机自启动(boot-up) 选项
This commit is contained in:
@@ -195,6 +195,17 @@ if [ "$1" = "start" ] ; then
|
|||||||
fi
|
fi
|
||||||
handleTask
|
handleTask
|
||||||
fi
|
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
|
elif [ "$1" = "stop" ]; then
|
||||||
getPid
|
getPid
|
||||||
if [ -n "$proc_id" ]
|
if [ -n "$proc_id" ]
|
||||||
|
|||||||
Reference in New Issue
Block a user