forked from freifunk-franken/firmware
Add "serve.sh", a script to serve another script's output via netcat
This commit is contained in:
parent
ec61999da2
commit
3f2a6e9f94
|
@ -0,0 +1,13 @@
|
|||
#!/bin/ash
|
||||
|
||||
[ $# -ge 3 ] || exit 1
|
||||
|
||||
PORT="$1"
|
||||
DELAY="$2"
|
||||
shift 2
|
||||
COMMAND="$@"
|
||||
|
||||
while true; do
|
||||
(nc -l -p $PORT -e $COMMAND) > /dev/null 2>&1
|
||||
sleep $DELAY
|
||||
done
|
Loading…
Reference in New Issue