ソースを参照

API calls added

Reinhard Russinger 7 年 前
コミット
652210cf5c

+ 38 - 0
board/PSG/iot2000/rootfs_overlay/etc/init.d/S99SLIDApi

@@ -0,0 +1,38 @@
+#!/bin/sh
+#
+# Start App	
+#
+#
+APPNAME=SLIDApi
+APPBIN=/opt/AuthenticVision/SLIDApi
+
+case "$1" in
+  start)
+        echo -e "Starting ${APPNAME} ...\n"
+	if [ ! -f ${APPBIN} ]; then
+		echo -e "Program ${APPBIN} doesn't exist \n"
+		exit 1
+	fi 
+        screen -dmS ${APPNAME} sh -c "while true; do ${APPBIN}; echo '${APPNAME} stopped--> restart'; sleep 2;done"
+        exit 0
+        ;;
+  stop)
+        echo -e "Stopping ${APPNAME} ...\n"
+        KILLPID=`screen -list | grep ${APPNAME} | awk -F'.' '{print $1}'`
+        if [ ${#KILLPID} != "0" ]
+                then
+                kill $KILLPID
+         fi
+         exit 0
+        ;;
+  restart|reload)
+        "$0" stop
+        "$0" start
+        ;;
+  *)
+        echo "Usage: $0 {start|stop|restart}"
+        exit 1
+esac
+
+exit $?
+

BIN
board/PSG/iot2000/rootfs_overlay/opt/AuthenticVision/CamServer


BIN
board/PSG/iot2000/rootfs_overlay/opt/AuthenticVision/SLIDApi