Merge pull request #7 from Freifunk-Troisdorf/remove-alfred
Remove alfred
This commit is contained in:
commit
f625622cc6
@ -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
|
|
||||||
|
|
@ -20,7 +20,6 @@ octet3rd="255"
|
|||||||
# CIDR muss /16 sein
|
# CIDR muss /16 sein
|
||||||
localserver=$(/bin/hostname)
|
localserver=$(/bin/hostname)
|
||||||
batadv=/usr/local/sbin/batadv-vis
|
batadv=/usr/local/sbin/batadv-vis
|
||||||
alfred=/usr/local/sbin/alfred
|
|
||||||
batctl=/usr/local/sbin/batctl
|
batctl=/usr/local/sbin/batctl
|
||||||
ip=/sbin/ip
|
ip=/sbin/ip
|
||||||
dig=/usr/bin/dig
|
dig=/usr/bin/dig
|
||||||
@ -48,10 +47,7 @@ $ip link set up dev bat0
|
|||||||
$ip addr add $communitynetwork.$octet3rd.${localserver#$communityname}/16 broadcast $communitynetwork.255.255 dev bat0
|
$ip addr add $communitynetwork.$octet3rd.${localserver#$communityname}/16 broadcast $communitynetwork.255.255 dev bat0
|
||||||
$ip -6 addr add $communitynetworkv6$octet3rd:${localserver#$communityname}/64 dev bat0
|
$ip -6 addr add $communitynetworkv6$octet3rd:${localserver#$communityname}/64 dev bat0
|
||||||
|
|
||||||
/usr/bin/killall alfred
|
|
||||||
/usr/bin/killall batadv-vis
|
/usr/bin/killall batadv-vis
|
||||||
/bin/sleep 5
|
|
||||||
$alfred -i bat0 > /dev/null 2>&1 &
|
|
||||||
/bin/sleep 15
|
/bin/sleep 15
|
||||||
$batadv -i bat0 -s > /dev/null 2>&1 &
|
$batadv -i bat0 -s > /dev/null 2>&1 &
|
||||||
#/bin/systemctl restart isc-dhcp-server
|
#/bin/systemctl restart isc-dhcp-server
|
||||||
|
@ -20,7 +20,6 @@ octet3rd="255"
|
|||||||
# CIDR muss /16 sein
|
# CIDR muss /16 sein
|
||||||
localserver=$(/bin/hostname)
|
localserver=$(/bin/hostname)
|
||||||
batadv=/usr/local/sbin/batadv-vis
|
batadv=/usr/local/sbin/batadv-vis
|
||||||
alfred=/usr/local/sbin/alfred
|
|
||||||
batctl=/usr/local/sbin/batctl
|
batctl=/usr/local/sbin/batctl
|
||||||
ip=/sbin/ip
|
ip=/sbin/ip
|
||||||
dig=/usr/bin/dig
|
dig=/usr/bin/dig
|
||||||
@ -49,10 +48,7 @@ $ip link set up dev bat0
|
|||||||
$ip addr add $communitynetwork.$octet3rd.${localserver#$communityname}/16 broadcast $communitynetwork.255.255 dev bat0
|
$ip addr add $communitynetwork.$octet3rd.${localserver#$communityname}/16 broadcast $communitynetwork.255.255 dev bat0
|
||||||
$ip -6 addr add $communitynetworkv6$octet3rd:${localserver#$communityname}/64 dev bat0
|
$ip -6 addr add $communitynetworkv6$octet3rd:${localserver#$communityname}/64 dev bat0
|
||||||
|
|
||||||
/usr/bin/killall alfred
|
|
||||||
/usr/bin/killall batadv-vis
|
/usr/bin/killall batadv-vis
|
||||||
/bin/sleep 5
|
|
||||||
$alfred -i bat0 > /dev/null 2>&1 &
|
|
||||||
/bin/sleep 15
|
/bin/sleep 15
|
||||||
$batadv -i bat0 -s > /dev/null 2>&1 &
|
$batadv -i bat0 -s > /dev/null 2>&1 &
|
||||||
/usr/sbin/service bind9 restart
|
/usr/sbin/service bind9 restart
|
||||||
|
@ -145,14 +145,6 @@
|
|||||||
- name: Install batctl
|
- name: Install batctl
|
||||||
shell: cd /tmp/batctl && git checkout {{ batmanversion }} && make && make install
|
shell: cd /tmp/batctl && git checkout {{ batmanversion }} && make && make install
|
||||||
when: getbatctl.changed
|
when: getbatctl.changed
|
||||||
- name: Get alfred
|
|
||||||
git: repo=http://git.open-mesh.org/alfred.git
|
|
||||||
dest=/tmp/alfred
|
|
||||||
when: aptupdates.changed
|
|
||||||
register: getalfred
|
|
||||||
- name: Install alfred
|
|
||||||
shell: cd /tmp/alfred && git checkout {{ batmanversion }} && make && make install
|
|
||||||
when: getalfred.changed
|
|
||||||
- name: Get Tunneldigger
|
- name: Get Tunneldigger
|
||||||
# git: repo=https://github.com/wlanslovenija/tunneldigger.git
|
# git: repo=https://github.com/wlanslovenija/tunneldigger.git
|
||||||
git: repo=https://github.com/ffrl/tunneldigger.git
|
git: repo=https://github.com/ffrl/tunneldigger.git
|
||||||
|
Loading…
Reference in New Issue
Block a user