Tumblelog by Soup.io
Newer posts are loading.
You are at the newest post.
Click here to check if anything new just came in.

Screen start two programs and display on tty2

io ~ # cat /etc/local.d/radio.start
#!/bin/bash
/bin/chgrp radio /dev/tty2
/bin/chmod g+r /dev/tty2
su -c '
screen -dmS "radio"
screen -S radio -p 0 -X stuff "sleep 5 ; ~/tag.py$(printf \\r)"
screen -S radio -X screen
screen -S radio -p 1 -X stuff "dump1090 --interactive --interactive-rows 62 --interactive-ttl 300 --net$(printf \\r)"
' radio
io ~ # cat /etc/local.d/radio.stop
#!/bin/bash
su -c "screen -S radio -X quit" radio
io ~ # grep ^c2 /etc/inittab
c2:2345:respawn:/bin/su -c "screen -r radio ; sleep 10" radio > /dev/tty2 < /dev/tty2
Tags: own linux
Reposted byjv6 jv6

Don't be the product, buy the product!

Schweinderl