-
Notifications
You must be signed in to change notification settings - Fork 0
/
urt_install
executable file
·43 lines (30 loc) · 1.15 KB
/
urt_install
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
#!/usr/bin/env bash
set -e
apt-get update
apt-get upgrade -y
apt-get install wget unzip -y
mkdir -p /opt/urt/
wget -O /opt/urt/server.zip 'https://urt.objects.dreamhost.com/4.2.023.zip'
wget -O /opt/urt/sha512.sum 'https://urt.objects.dreamhost.com/sha256.sum'
shasum -b -a 512 -c /opt/urt/sha512.sum
mkdir -p /tmp/urtserver/
unzip /opt/urt/server.zip -d /tmp/urtserver/
mv /tmp/urtserver/UrbanTerror42/ /opt/urt/urtserver
rm -rf /tmp/urtserver
wget -O /opt/urt/urtserver/q3ut4/server.cfg 'https://raw.githubusercontent.com/urtdevs/urt.tf/master/server.cfg'
wget -O /tmp/ncconfigs.zip 'http://downloads.urban-zone.org/files/nationscupcfg.zip'
unzip /tmp/ncconfigs.zip -d /opt/urt/urtserver/q3ut4/
wget -O /tmp/uzconfigs.zip 'http://urban-zone.org/configs/UrbanZoneConfigs2014.zip'
unzip /tmp/uzconfigs.zip -d /opt/urt/urtserver/q3ut4/
useradd -M -d /opt/urt/ -s /bin/bash -U urtserver
chown -R urtserver:urtserver /opt/urt
cat >/etc/init/urtserver.conf <<EOF
description "urban terror server"
author "Jon Chen"
setuid urtserver
setgid urtserver
start on filesystem and net-device-up IFACE=eth0
respawn
exec /opt/urt/urtserver/Quake3-UrT-Ded.x86_64
EOF
start urtserver