summaryrefslogtreecommitdiff
path: root/linuxinstall
diff options
context:
space:
mode:
authorfangshunjian <[email protected]>2018-11-26 10:45:30 +0800
committerfangshunjian <[email protected]>2018-11-26 10:45:30 +0800
commit25f7bc1c6bc89ae4e1691494693b5827669ff558 (patch)
treee3a92376ca1545a5d0f2605f13828573674c3c07 /linuxinstall
parentdcb7995f887fe93aaf917d6ddb39b7242b12ad54 (diff)
1、脚本中增加开机自启动(boot-up)选项
Diffstat (limited to 'linuxinstall')
-rw-r--r--linuxinstall/shell/datacontroller.sh13
1 files changed, 12 insertions, 1 deletions
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" ]