Commit 83d07491 authored by sokai's avatar sokai

first uci version

parent 4d6a63ca
......@@ -26,25 +26,20 @@ CRONINTERVAL=$(head -30 /dev/urandom | tr -dc "0123456789" | head -c2) # run cro
WIF=$(ifconfig | awk '/10\.22\.[0-9]{1,3}\.[0-9]{1,3}/ {print $1}' RS="\n\n" | grep wlan) #
#WIFI= uci show = [email protected][0].ifname=wlan0-adhoc-2
HOSTNAME=$(cat /etc/config/system| awk '/hostname/ {print $3}'|sed 's/ /%20/g')
#HOSTNAME=$(uci show system|grep -i hostname|cut -d '=' -f2|sed 's/ /%20/g')
HOSTNAME=$(uci show system|grep -i hostname|cut -d '=' -f2|sed 's/ /%20/g')
IP=$(ifconfig ${WIF}|grep 'inet addr'|awk '{print $2}'| sed 's/addr://'|sed 's/ /%20/g')
GWIP=$(ip route | awk '/default via/ {print $3}') # awk nicht installiert :(
LATITUDE=$(grep 'latitude' /etc/config/system| awk '{$1=$2="";print}'|sed 's/ /%20/g')
#LATITUDE=$(uci show system|grep -i latitude|cut -d '=' -f2|sed 's/ /%20/g')
LONGITUDE=$(grep 'longitude' /etc/config/system| awk '{$1=$2="";print}'|sed 's/ /%20/g')
#LONGITUDE=$(uci show system|grep -i longitude|cut -d '=' -f2|sed 's/ /%20/g')
LATITUDE=$(uci show system|grep -i latitude|cut -d '=' -f2|sed 's/ /%20/g')
LONGITUDE=$(uci show system|grep -i longitude|cut -d '=' -f2|sed 's/ /%20/g')
LOCATION=$(grep 'location' /etc/config/system|awk '{$1=$2="";print}'|sed 's/ /%20/g')
#LOCATION=$(uci show system|grep -i location|cut -d '=' -f2|sed 's/ /%20/g')
LOCATION=$(uci show system|grep -i location|cut -d '=' -f2|sed 's/ /%20/g')
CONTACT=$(grep 'mail' /etc/config/freifunk|awk '{$1=$2="";print}'|sed 's/ /%20/g'|sed 's/#/%23/g')
#CONTACT=$(uci show |grep -i '' |cut -d '=' -f2|sed 's/ /%20/g')
UPTIME=$(cat /proc/uptime|cut -d ' ' -f2|sed 's/ /%20/g')
FIRMWARE=$(cat /etc/openwrt_version|sed 's/ /%20/g')
#FIRMWARE=$(uci show system|grep -i version|cut -d '=' -f2|sed 's/ /%20/g')
FIRMWARE=$(uci show system|grep -i version|cut -d '=' -f2|sed 's/ /%20/g')
MACHINE=$(grep 'machine' /proc/cpuinfo|awk '{$1=$2=""; print}'| sed 's/\ \ //'|sed 's/ /%20/g')
SYSTEMTYPE=$(grep 'system type' /proc/cpuinfo|awk '{$1=$2=""; print}'| sed 's/ : //'|sed 's/ /%20/g')
CLIENTS=$(iw dev ${WIF} station dump|grep -c Station)
#CLIENTS=$(iw dev ${WIF} station dump|grep -c Station)
#CLIENTS=$(cat /tmp/dhcp.leases|wc -l)
start() {
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment