start_ASP.sh 761 B

123456789101112131415161718192021222324252627282930
  1. echo "sleep 5"
  2. #sleep 5
  3. path="/opt/LibreLight"
  4. netns=$(ip netns identify $$)
  5. ARTNET_INPUT_NET="10."
  6. ARTNET_NODE_NET="2.255.255.255"
  7. CONFIG="$HOME/LibreLight/ASP.conf"
  8. if [ -f $CONFIG ] ; then
  9. echo ""
  10. echo "READ CONFIG FILE: $CONFIG"
  11. KEY="ARTNET_NODE_NET="
  12. X=$(grep "^$KEY" $CONFIG | cut -d "=" -f 2 | tail -n1)
  13. if [ "x" != "x$X" ] ; then
  14. echo "-- OK $KEY $X"
  15. ARTNET_NODE_NET="$X"
  16. fi
  17. KEY="ARTNET_INPUT_NET="
  18. X=$(grep "^$KEY" $CONFIG | cut -d "=" -f 2 | tail -n1)
  19. if [ "x" != "x$X" ] ; then
  20. echo "-- OK $KEY $X"
  21. ARTNET_INPUT_NET="$X"
  22. fi
  23. echo "CONFIG OK: $CONFIG"
  24. echo ""
  25. fi
  26. python3 $path/ASP/ArtNetProcessor.py --recive $ARTNET_INPUT_NET --sendto $ARTNET_NODE_NET netns=$netns