You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

51 lines
1.5 KiB

#!/bin/bash
#SERVICE_NAME="mon"
#is_running() {
#pgrep -x "$SERVICE_NAME" > /dev/null
#}
export PATH="$PATH":/emmc/plugin/python/bin
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH":/emmc/plugin/python/lib:/emmc/plugin/python/usr/lib:/emmc/plugin/python/lib:/emmc/plugin/python/usr/lib:/usr/bin
case ${1} in
start)
rm "/www/airelay";rm "/airelay"
killall -9 mon;
killall -9 osd_server;
killall -9 gynet;
#if is_running; then
#echo "Service is already running.";exit 1;
#fi
ln -s "/emmc/plugin/Aida" "/www/airelay";ln -s "/emmc/plugin/Aida_data/storage" "/www/airelay";
ln -s "/emmc/plugin/Aida" "/airelay"
/emmc/plugin/Aida_data/tof_initial
/emmc/plugin/Aida_data/switch_different_version
chmod 777 /emmc/plugin/Aida_data/config.json
chmod 777 /emmc/plugin/Aida_data/cold_objects.json
chmod 777 /emmc/plugin/Aida_data/events.json
echo 3 > /proc/sys/vm/drop_caches
echo 1 > /proc/sys/vm/compact_memory
/emmc/plugin/Aida_data/aiengine_initial
/emmc/plugin/Aida_data/mon -s 2 "/emmc/plugin/Aida_data/gynet server -http_port 8592" &
echo "Gynet Http Service"
sleep 1
;;
stop)
rm "/www/airelay"
rm "/airelay"
killall -15 mon
killall -15 osd_server
killall -15 gynet
echo 3 > /proc/sys/vm/drop_caches
echo 1 > /proc/sys/vm/compact_memory
/emmc/plugin/Aida_data/sfe/faceengine stop
;;
*)
echo "Usage: ${0} {start|stop}"
exit 1
;;
esac
exit 0