-
Notifications
You must be signed in to change notification settings - Fork 0
/
install_remote_ui.sh
executable file
·51 lines (41 loc) · 1.91 KB
/
install_remote_ui.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
#!/bin/bash
# Install a development environment for the Mumble-Ruby-Pluginbot remoteui
sudo apt-get update
sudo apt-get --allow-unauthenticated -qy install ruby lighttpd
cd /home/botmaster/src/mumble-ruby-pluginbot
git fetch
git checkout devel
git pull origin devel
cp /home/botmaster/src/mumble-ruby-pluginbot/config/config.yml /home/botmaster/src/bot1_conf.yml
sed -r -i -e 's/(remoteui: false)/remoteui: true/g' /home/botmaster/src/bot1_conf.yml
# Overwrite default lighttpd config
cat<<EOF > /tmp/lighttpd.config
server.port = 80
server.username = "botmaster"
server.groupname = "botmaster"
server.document-root = "/home/botmaster/src/mumble-ruby-pluginbot/http/"
server.errorlog = "/home/botmaster/logs/lighttpd_error.log"
server.max-request-field-size = 200000
server.max-request-size = 500
dir-listing.activate = "enable"
index-file.names = ( "index.html" )
mimetype.assign = (
".html" => "text/html",
".txt" => "text/plain",
".css" => "text/css",
".js" => "application/x-javascript",
".jpg" => "image/jpeg",
".jpeg" => "image/jpeg",
".gif" => "image/gif",
".png" => "image/png",
"" => "application/octet-stream"
)
server.modules += ( "mod_cgi" )
cgi.assign = ( ".rb" => "/usr/bin/ruby" )
index-file.names += ("index.rb", "default.rb" )
EOF
sudo mv /tmp/lighttpd.config /etc/lighttpd/lighttpd.conf
sudo chown root:root /etc/lighttpd/lighttpd.conf
sudo systemctl restart lighttpd
sudo systemctl restart mumblerubypluginbot
echo -en "\n\n\n\nReady :)\n\nNow you can create a port forwarding from outside to port 80 on this machine.\n\n\n"