23 lines
500 B
Plaintext
23 lines
500 B
Plaintext
|
#!/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 "`cat /home/sats/satsd/conf/machine.state`\n";
|
||
|
|
||
|
done;
|