-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinit.sh
41 lines (32 loc) · 1.14 KB
/
init.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#! /bin/bash
echo "updating apt-get"
apt-get update
echo "installing udhcpd"
sudo apt-get install udhcpd
cp conf/udhcpd /etc/default/udhcpd
cp conf/udhcpd.conf /etc/udhcpd.conf
echo "installing hostapd..."
sudo apt-get install bridge-utils hostapd
wget http://www.daveconroy.com/wp3/wp-content/uploads/2013/07/hostapd.zip
unzip hostapd.zip
sudo mv /usr/sbin/hostapd /usr/sbin/hostapd.bak
sudo mv hostapd /usr/sbin/hostapd.edimax
sudo ln -sf /usr/sbin/hostapd.edimax /usr/sbin/hostapd
sudo chown root.root /usr/sbin/hostapd
sudo chmod 755 /usr/sbin/hostapd
cp conf/hostapd.conf /etc/hostapd/
echo "DAEMON_CONF=\"/etc/hostapd/hostapd.conf\"" >> /etc/default/hostapd
echo "copying interfaces conf"
cp conf/interfaces /etc/network/interfaces
echo "configuring ip forwarding"
echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
echo "installing nginx"
apt-get nginx
echo "installing gsync tools"
sudo apt-get install python-setuptools
sudo easy_install pip
sudo pip install setuptools --no-use-wheel --upgrade
sudo pip install gsync
echo "syncing..."
time gsync --progress -u -d -r -vi drive://coderdojoSource /home/pi