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