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