This commit is contained in:
xdrm-brackets 2017-07-21 16:14:12 +02:00
parent ca25a414fc
commit f7b5445ded
1 changed files with 2 additions and 2 deletions

4
update
View File

@ -16,8 +16,8 @@ IFACE=`sudo ifconfig | grep -o -P "^w\w+"`;
# (3) Get network identity # # (3) Get network identity #
AP_ID=`sudo iwconfig $IFACE | grep -o -P "ESSID:\"SATS_.+\"" | sed 's/ESSID:"SATS_//' | sed 's/"$//'`; AP_ID=`sudo iwconfig $IFACE | grep -o -P "ESSID:\"SATS_.+\"" | sed 's/ESSID:"SATS_//' | sed 's/"$//'`;
IP_AD=`sudo ifconfig $IFACE | grep -o -P "inet addr:\d+\.\d+\.\d+\.\d+" | sed 's/inet addr://'` IP_AD=`sudo ifconfig $IFACE | grep -o -P "inet addr:\d+\.\d+\.\d+\.\d+" | sed 's/inet addr://'`
echo $AP_ID | sudo -u sats tee $TMP_DIR/net.ap; echo $AP_ID > $TMP_DIR/net.ap;
echo $IP_AD | sudo -u sats tee $TMP_DIR/net.ip; echo $IP_AD > $TMP_DIR/net.ip;
# (2) Send data + fetch configuration # (2) Send data + fetch configuration
test "$($SOURCE_DIR/lib/api/update)" = "127" && slog "update failed" - "update" && exit 127; test "$($SOURCE_DIR/lib/api/update)" = "127" && slog "update failed" - "update" && exit 127;