From 25f7bc1c6bc89ae4e1691494693b5827669ff558 Mon Sep 17 00:00:00 2001 From: fangshunjian Date: Mon, 26 Nov 2018 10:45:30 +0800 Subject: [PATCH] =?UTF-8?q?1=E3=80=81=E8=84=9A=E6=9C=AC=E4=B8=AD=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E5=BC=80=E6=9C=BA=E8=87=AA=E5=90=AF=E5=8A=A8=EF=BC=88?= =?UTF-8?q?boot-up=EF=BC=89=E9=80=89=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- linuxinstall/shell/datacontroller.sh | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/linuxinstall/shell/datacontroller.sh b/linuxinstall/shell/datacontroller.sh index dfb7d8a..d851df0 100644 --- a/linuxinstall/shell/datacontroller.sh +++ b/linuxinstall/shell/datacontroller.sh @@ -134,7 +134,18 @@ elif [ "$1" = "stop" ]; then echo "$name kill ok !!!!!!!!!!!!!" else echo "$name is not start!!!!!!!!!!!" - fi + fi +elif [ "$1" = "boot-up" ]; then + #设置开机自启动 + if [ -z "$(cat /etc/rc.local|grep -E "^\s*$DATACONTROLLER_HOME/shell/startup.sh")" ] + then + echo "">> /etc/rc.local + echo "########## datacontroller开机启动 ###########" >> /etc/rc.local + echo $DATACONTROLLER_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" = "restart" ] ; then getPid if [ -n "$proc_id" ]