#!/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 $ROOT/com/write sats "GPIO`cat /home/sats/satsd/conf/machine.state`\n"; done;