...
代码块 | ||
---|---|---|
| ||
#!/bin/bash
PRG="$0"
PRGDIR=`dirname "$PRG"`
cd $PRGDIR
Current_Dir=$(cd `dirname $0`; pwd)
case "$1" in
'start')
nohup sh ${Current_Dir}/run.sh > /dev/null 2>&1 &
;;
'stop')
kill -9 $(ps -ef | grep ""Dnode.id=ffffffff" | grep "log.properties" | awk '{print $2}')
;;
'restart')
kill -9 $(ps -ef | grep ""Dnode.id=ffffffff" | grep "log.properties" | awk '{print $2}')
nohup sh ${Current_Dir}/run.sh > /dev/null 2>&1 &
;;
*)
echo "Usage: $0 {start|stop|restart} --config config-path"
;;
esac |
并添加执行权限
chmod +x SmartbiUnionServer/unionserver.sh
...