-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathinstall.sh
executable file
·185 lines (141 loc) · 4.14 KB
/
install.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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
#!/bin/sh
#
# sudo ./install.sh
# currently requires prepare_fresh_ubuntu_for_deploy.sh on in the same dir as this script
# setup hostname
echo "Hostname is currently `hostname`"
read -p "Enter new hostname
" -r NEWNAME
echo "$NEWNAME" > /etc/hostname
# we need to remove everything from your /etc/resolv.conf but we need to resolve some domains for downlads for now`
echo "nameserver 196.216.8.4" > /etc/resolv.conf
# make your /etc/network/interfaces look like this:
echo "
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
address 192.168.5.200
netmask 255.255.255.0
gateway 192.168.5.1" > /etc/network/interfaces
#setup hosts file
echo "
192.168.5.200 bart localhost $NEWNAME" >> /etc/hosts
# Requisites
# Bind9 conflicts with dnsmasq
command="apt-get remove bind9"
echo "Running: $command"
read -p "Press any key to begin" -r A
$command
command="apt-get install dnsmasq firefox-2 build-essential git-core wvdial"
echo "Running: $command"
read -p "Press any key to begin" -r A
$command
# Why do we need this?
echo "Becoming root user"
command="apt-get install xinit xauth"
echo "Running: $command"
read -p "Press any key to begin" -r A
$command
# In order to set this up on the server you will need to do a couple of things, such as:
command="adduser firefox"
echo "Running: $command"
read -p "Press any key to begin" -r A
$command
#command="su firefox"
#echo "Running: $command"
#read -p "Press any key to begin"
#$command
command="cd /home/firefox"
echo "Running: $command"
read -p "Press any key to begin" -r A
$command
# install git, make, gcc
#echo "
#deb http://us.archive.ubuntu.com/ubuntu/ hardy-updates main multiverse universe
#deb-src http://us.archive.ubuntu.com/ubuntu/ hardy-updates main multiverse universe" >> /etc/apt/sources.list
#command="apt-get install git-core build-essential"
#echo "Running: $command"
#read -p "Press any key to begin"
#$command
command="git init"
echo "Running: $command"
read -p "Press any key to begin" -r A
$command
#echo "Enter the git url for firefox (git://github.com/baobab/firefox-daemon.git)"
#read -e GIT_URL
GIT_URL="git://github.com/baobab/firefox-daemon.git"
command="git remote add origin $GIT_URL"
echo "Running: $command"
read -p "Press any key to begin" -r A
$command
command="git pull origin master"
echo "Running: $command"
read -p "Press any key to begin" -r A
$command
command="cd src"
echo "Running: $command"
read -p "Press any key to begin" -r A
$command
command="make"
echo "Running: $command"
read -p "Press any key to begin" -r A
$command
command="cp apps/baobab.firefox/baobab.firefox* .."
echo "Running: $command"
read -p "Press any key to begin" -r A
$command
command="cd .."
echo "Running: $command"
read -p "Press any key to begin" -r A
$command
#command="exit"
#echo "Running: $command"
#read -p "Press any key to begin"
#$command
command="cp firefox-daemon /etc/init.d/"
echo "Running: $command"
read -p "Press any key to begin" -r A
$command
command="sudo /usr/sbin/update-rc.d -f firefox-daemon defaults"
echo "Running: $command"
read -p "Press any key to begin" -r A
$command
command="sudo /etc/init.d/firefox-daemon"
echo "Running: $command"
read -p "Press any key to begin" -r A
$command
echo "make sure you have a /usr/bin/firefox, you may have /usr/bin/firefox-2"
command="sudo ln /usr/bin/firefox-2 /usr/bin/firefox"
echo "Running: $command"
read -p "Press any key to begin" -r A
$command
# make your /etc/dnsmasq.conf file look like this (replace x with your subnet)
echo "dhcp-range=192.168.5.100,192.168.5.150,12h" > /etc/dnsmasq.conf
# TODO: merge these scripts
#echo "get second install script"
#cd /home/firefox
#command="git clone git://gist.github.com/10601.git"
#read -p "Press any key to begin" -r A
#$command
#cd 10601
cd ~
chmod ugo+x prepare_fresh_ubuntu_for_deploy.sh
command="sh prepare_fresh_ubuntu_for_deploy.sh"
$command
# remove everything from your /etc/resolv.conf
echo "" > /etc/resolv.conf
# restart dnsmasq
command="sudo /etc/init.d/dnsmasq restart"
echo "Running: $command"
read -p "Press any key to begin" -r A
$command
echo "
# You may want to debug
#ps aux | grep firefox
#sudo kill XXXX
#sudo su firefox
#cd ~
#./baobab.firefox
#<connect>"
echo "Finito!"