Compare commits

..

12 Commits
v2 ... master

Author SHA1 Message Date
xdrm-brackets 84201b5841 upd: 'com' submodule 2018-02-07 22:08:30 +01:00
xdrm-brackets 04b40765ff updated submodule 'com' 2018-02-06 08:36:39 +01:00
xdrm-brackets 8ec4d4c30a updated 'com' to 'stable' (also updated) 2018-02-01 16:07:41 +01:00
xdrm-brackets 04a8a69b6e updated 'daemon' to new 'com' lib 2018-02-01 13:37:40 +01:00
xdrm-brackets 49b3f359c6 Updated 'com' to tag 'stable' 2018-02-01 13:35:57 +01:00
xdrm-brackets c30e207895 updated 'com' 2018-01-31 20:56:51 +01:00
xdrm-brackets 1d7f80044b added signal management for 1 more signal 2018-01-31 20:56:41 +01:00
xdrm-brackets c98bfaa85c update 'com' 2018-01-31 07:31:17 +01:00
xdrm-brackets 65c6543bf1 updated sub-view's to use 'com/read' 2018-01-31 07:28:41 +01:00
xdrm-brackets b01daab1c1 updated sub-view's 2018-01-31 07:22:53 +01:00
xdrm-brackets 5b30063dca updated 'com' 2018-01-31 07:17:44 +01:00
xdrm-brackets e9643f24b0 Updated 'com' from 'v1' to 'v2' 2018-01-30 22:56:23 +01:00
5 changed files with 7 additions and 16 deletions

2
.gitmodules vendored
View File

@ -1,4 +1,4 @@
[submodule "com"] [submodule "com"]
path = com path = com
url = https://git.xdrm.io/xdrm-brackets/bash-socket.git url = https://git.xdrm.io/logauth/bash-com.git
branch = master branch = master

2
com

@ -1 +1 @@
Subproject commit e4fabe885339bd927648d114c6783732d9ee846b Subproject commit af9f200188e3e90eda8aef7a1cb306712fd67924

7
daemon
View File

@ -18,14 +18,11 @@ 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;" INT KILL; trap "rm $ROOT/.lock 2>/dev/null; exit 1;" HUP INT KILL TERM;
# (3) Wait for trigger to launch server # (3) Wait for trigger to launch server
#--------------------------------------------------------# #--------------------------------------------------------#
# (1) Wait for trigger # # (1) Wait for trigger #
$ROOT/com/trigger 9999; $ROOT/com/pool key123 9999
# (2) Launch server #
$ROOT/com/launch ioemu $SATS_IP 44440 44441;

View File

@ -17,14 +17,11 @@ 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="`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"; echo "state: $STATE";

View File

@ -17,14 +17,11 @@ 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="`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 # # (5) Store each service #
while IFS= read -r line; do while IFS= read -r line; do