micha 3 жил өмнө
parent
commit
399222e0f7
3 өөрчлөгдсөн 22 нэмэгдсэн , 10 устгасан
  1. 14 0
      monitor/loop.sh
  2. 8 0
      monitor/setup_dmx.sh
  3. 0 10
      setup_dmx.sh

+ 14 - 0
monitor/loop.sh

@@ -0,0 +1,14 @@
+#!/usr/bin/sh
+
+while :
+do
+  sh '/opt/LibreLight/ASP/start.sh'
+  PS1="X:"
+  PS1="$PS1 $(ip netns identify $$)"
+  export PS1
+  echo "execute some command or, exit shell and restart loop with <CTRL+D>"
+  sh
+  echo "Press <CTRL+C> to exit. in 1sec to exit screen loop"
+  sleep 5
+done
+

+ 8 - 0
monitor/setup_dmx.sh

@@ -0,0 +1,8 @@
+#!/usr/bin/bash
+# to execute as cron job @reboot with an admin user ! not secure !
+
+sudo su user -c 'screen -ls'
+sudo su user -c 'screen -XS DMX quit | echo ""'
+sleep 5
+sudo sh /opt/LibreLight/ASP/netns.sh 25
+sudo ip netns exec blue225 su user -c 'screen -d -m -S DMX sh loop.sh'

+ 0 - 10
setup_dmx.sh

@@ -1,10 +0,0 @@
-#!/usr/bin/bash
-# to execute as cron job @reboot with an admin user ! not secure !
-
-sudo su user -c 'screen -ls'
-sudo su user -c 'screen -XS DMX quit | echo ""'
-sleep 5
-sudo sh /opt/LibreLight/ASP/netns.sh 25
-sudo ip netns exec blue225 su user -c 'screen -d -m -S DMX sh /opt/LibreLight/ASP/start.sh'
-#screen -r DMX
-#sudo ip netns exec blue224 su user -c 'screen -d -m -S ASP_IN sh /opt/LibreLight/ASP/map14_in_to0.sh'