Delete alfred.sh.j2

This commit is contained in:
stebifan 2016-04-09 15:55:01 +02:00
parent 0a4e4b13ec
commit 1ef6bd8b52

View File

@ -1,51 +0,0 @@
#!/bin/sh
release=$(/bin/uname -r)
nodeid=$( /bin/echo {{ sn_mesh_MAC }} | /bin/sed s/://g)
#meshh_if=$(/bin/cat /sys/class/net/troisdorf*/address | /bin/grep -v ^00:00:00)
meshh_if=$(/bin/cat /sys/class/net/l2tp*/address | /bin/grep -v ^00:00:00)
tempfile=/tmp/alfred_info
if [ -f $tempfile ]
then
/bin/rm $tempfile
fi
/bin/cat > $tempfile <<EOF
{
"network": {
"mac": "{{ sn_mesh_MAC }}",
"addresses": [
"{{ sn_mesh_IPv6 }}",
"{{ sn_mesh_IPv4 }}"
],
"mesh_interfaces": [
$(for i in $meshh_if; do /bin/echo '"'$i'",';done)
"{{ ul_mesh_MAC }}",
"{{ sn_mesh_MAC }}"
]
},
"vpn": true,
"node_id": "$nodeid",
"hostname": "Gateway:{{ sn_hostname }}",
"hardware": {
"model": "vServer"
},
"owner": {
"contact": "stefan@freifunk-troisdorf.de"
}
}
EOF
if [ -f $tempfile ]
then
/bin/cat "$tempfile" | /bin/gzip | /usr/local/sbin/alfred -s 158
fi
if [ -f $tempfile ]
then
/bin/rm $tempfile
fi
exit 0