forked from zentralwerk/network
nix/pkgs/openwrt/usteer-stats: fix fifo path to writable location
This commit is contained in:
parent
e4337940bf
commit
a8bb090bba
|
@ -1,3 +1,3 @@
|
||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
[ -p /var/run/usteer-info ] || exit 0
|
[ -p /tmp/usteer-info ] || exit 0
|
||||||
exec /bin/ubus call usteer local_info > /var/run/usteer-info
|
exec /bin/ubus call usteer local_info > /tmp/usteer-info
|
||||||
|
|
|
@ -3,10 +3,10 @@
|
||||||
HOSTNAME=`cat /proc/sys/kernel/hostname`
|
HOSTNAME=`cat /proc/sys/kernel/hostname`
|
||||||
INTERVAL=60
|
INTERVAL=60
|
||||||
|
|
||||||
[ -p /var/run/usteer-info ] || mkfifo /var/run/usteer-info
|
[ -p /tmp/usteer-info ] || mkfifo /tmp/usteer-info
|
||||||
|
|
||||||
while true; do
|
while true; do
|
||||||
DATA="$(cat /var/run/usteer-info)"
|
DATA="$(cat /tmp/usteer-info)"
|
||||||
cd /sys/class/net
|
cd /sys/class/net
|
||||||
for iface in wlan*; do
|
for iface in wlan*; do
|
||||||
eval $( echo "$DATA" | jsonfilter \
|
eval $( echo "$DATA" | jsonfilter \
|
||||||
|
|
Loading…
Reference in New Issue
Block a user