#! /bin/sh # # case "$1" in start|"") # Run App use default run.lua /usr/bin/killall app if [ -f /mnt/app.ini ] ; then source /mnt/app.ini fi /bin/app -d -r /root -l /tmp/lotlog.txt 2>/dev/null ;; stop) /usr/bin/killall app ;; kill) /usr/bin/killall -kill app ;; run) /usr/bin/killall app if [ -f /mnt/app.ini ] ; then source /mnt/app.ini fi /bin/app -d -r /root -l /tmp/lotlog.txt 2>/dev/null ;; debug) /usr/bin/killall app # /bin/app -e -r /root /root/run.lua # websocket fix, daq should lower permissions if [ -f /mnt/app.ini ] ; then source /mnt/app.ini fi /bin/su -p -c '/bin/app -e -r /root /root/run.lua' lua ;; websocket) /usr/bin/killall websocketd /usr/bin/screen -dmS websock /bin/websocketd --staticdir=/mnt/www --port=88 /root/ctrlapp debug ;; *) echo "Usage: $0 {start|stop|run|debug|websocket}" >&2 exit 1 ;; esac