ioemu/sats/gpio

23 lines
504 B
Plaintext
Raw Permalink Normal View History

#!/bin/bash
# (1) Primary init.
#--------------------------------------------------------#
# (1) Get absolute folder #
ROOT=$(dirname `realpath $0`);
ROOT=`dirname $ROOT`;
# (2) Check config file #
test ! -f $ROOT/com/config/sats && echo "Daemon not started" && exit 1;
# (3) Fetch BUFFERS #
source $ROOT/com/config/sats;
# (2) Start daemon
#--------------------------------------------------------#
while sleep 1; do
2018-01-29 18:53:40 +00:00
$ROOT/com/write sats "GPIO`cat /home/sats/satsd/conf/machine.state`\n";
done;