initial commit with all the stuff
This commit is contained in:
44
3B/archive/root_3.bak/ctrlapp
Normal file
44
3B/archive/root_3.bak/ctrlapp
Normal file
@@ -0,0 +1,44 @@
|
||||
#! /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
|
||||
Reference in New Issue
Block a user