Compare commits
No commits in common. "master" and "v2" have entirely different histories.
|
@ -1,4 +1,4 @@
|
||||||
[submodule "com"]
|
[submodule "com"]
|
||||||
path = com
|
path = com
|
||||||
url = https://git.xdrm.io/logauth/bash-com.git
|
url = https://git.xdrm.io/xdrm-brackets/bash-socket.git
|
||||||
branch = master
|
branch = master
|
||||||
|
|
2
com
2
com
|
@ -1 +1 @@
|
||||||
Subproject commit af9f200188e3e90eda8aef7a1cb306712fd67924
|
Subproject commit e4fabe885339bd927648d114c6783732d9ee846b
|
7
daemon
7
daemon
|
@ -18,11 +18,14 @@ touch $ROOT/.lock;
|
||||||
|
|
||||||
# (2) Set traps before starting any subproccess
|
# (2) Set traps before starting any subproccess
|
||||||
#--------------------------------------------------------#
|
#--------------------------------------------------------#
|
||||||
trap "rm $ROOT/.lock 2>/dev/null; exit 1;" HUP INT KILL TERM;
|
trap "rm $ROOT/.lock 2>/dev/null; exit 1;" INT KILL;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# (3) Wait for trigger to launch server
|
# (3) Wait for trigger to launch server
|
||||||
#--------------------------------------------------------#
|
#--------------------------------------------------------#
|
||||||
# (1) Wait for trigger #
|
# (1) Wait for trigger #
|
||||||
$ROOT/com/pool key123 9999
|
$ROOT/com/trigger 9999;
|
||||||
|
|
||||||
|
# (2) Launch server #
|
||||||
|
$ROOT/com/launch ioemu $SATS_IP 44440 44441;
|
|
@ -17,11 +17,14 @@ test ! -f $ROOT/.lock && echo "Daemon not started" && exit 1;
|
||||||
# (1) Initialise vars #
|
# (1) Initialise vars #
|
||||||
LED="0"; Rx=(0 0 0); # led; relays
|
LED="0"; Rx=(0 0 0); # led; relays
|
||||||
|
|
||||||
|
# (2) Get BUF_IN #
|
||||||
|
source $ROOT/com/config/ioemu;
|
||||||
|
|
||||||
|
|
||||||
while sleep 1; clear; do
|
while sleep 1; clear; do
|
||||||
|
|
||||||
# (3) Get last value from lines beginning by 'GSTA' #
|
# (3) Get last value from lines beginning by 'GSTA' #
|
||||||
STATE="`$ROOT/com/read gpio | grep -Po "^GPIO(.+)$" | sed 's/^GPIO\(....\)$/\1/g' | tail -n1`";
|
STATE="`cat $BUF_IN | grep -Po "^GPIO(.+)$" | sed 's/^GPIO\(....\)$/\1/g' | tail -n1`";
|
||||||
|
|
||||||
echo "state: $STATE";
|
echo "state: $STATE";
|
||||||
|
|
||||||
|
|
|
@ -17,11 +17,14 @@ test ! -f $ROOT/.lock && echo "Daemon not started" && exit 1;
|
||||||
# (1) Initialise vars #
|
# (1) Initialise vars #
|
||||||
declare -A SERV;
|
declare -A SERV;
|
||||||
|
|
||||||
|
# (2) Get BUF_IN #
|
||||||
|
source $ROOT/com/config/ioemu;
|
||||||
|
|
||||||
# (3) For each service update #
|
# (3) For each service update #
|
||||||
while sleep 1; clear; do
|
while sleep 1; clear; do
|
||||||
|
|
||||||
# (4) Get last value from lines beginning by 'GSTA' #
|
# (4) Get last value from lines beginning by 'GSTA' #
|
||||||
SERV_LIST="`$ROOT/com/read systemd | grep -Po "^SYSD(.+)$" | sed 's/^SYSD\(.\+\)$/\1/g' | tail -n20`";
|
SERV_LIST="`cat $BUF_IN | grep -Po "^SYSD(.+)$" | sed 's/^SYSD\(.\+\)$/\1/g' | tail -n20`";
|
||||||
|
|
||||||
# (5) Store each service #
|
# (5) Store each service #
|
||||||
while IFS= read -r line; do
|
while IFS= read -r line; do
|
||||||
|
|
Loading…
Reference in New Issue