service 554 Bytes
Newer Older
AtjonTV's avatar
AtjonTV committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14
#!/bin/bash

if [ "$1" == "start" ]; then
  /usr/bin/java -jar /opt/aaab-master/aaab-master.jar --config=/opt/aaab-master/config.konf &>> "/opt/aaab-master/logs/$(date '+%Y-%m-%d').log"
elif [ "$1" == "startx" ]; then
  screen -S aaab-master ./service start
elif [ "$1" == "stop" ]; then
  kill `ps -ef | grep -v awk | awk -e '/java.*aaab-master/ { print $2 }'`
elif [ "$1" == "update" ]; then
  if [ -e "/tmp/___465acac8-forceRestart" ]; then
    /opt/aaab-master/deploy $(cat /tmp/___465acac8-forceRestart)
    rm /tmp/___465acac8-forceRestart
  fi
fi