-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
51 lines (36 loc) · 1.11 KB
/
setup.sh
File metadata and controls
51 lines (36 loc) · 1.11 KB
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
echo " ____ __ ____ ____ "
echo "( _ \( )( __)(_ _)"
echo " ) / )( ) _) )( "
echo "(__\_)(__)(__) (__) "
echo "This is the setup program for a new server for RIFT!"
echo "This should be an ubuntu 22 server and this script should be run with sudo"
echo -n "Ready to proceed? [Press ENTER]"
read proceed1
apt-get update
apt-get install docker docker-compose nginx git cockpit maven -y
snap install certbot --classic
cd /
mkdir /deployments
git clone https://github.com/RIFT24/riftdev.git
ufw allow openssh
ufw allow 'Nginx Full'
ufw delete allow 'Nginx HTTP'
ufw enable
chmod 755 /deployments
chmod 755 /deployments/*
chown ubuntu /deployments
chgrp ubuntu /deployments
cd /
rm -rf /etc/update-motd.d/00-header
cp /riftdev/scripts/00-header /etc/update-motd.d/00-header
chmod +x /etc/update-motd.d/00-header
mv /etc/update-motd.d/10-* /riftdev/
mv /etc/update-motd.d/9* /riftdev/
chmod +x /riftdev/scripts/*
chmod +x /riftdev/update.sh
cp /riftdev/scripts/build.sh /usr/bin/build
chmod +x /usr/bin/build
cp /riftdev/scripts/main.sh /usr/bin/rift
chmod +x /usr/bin/rift
echo "Setup Complete"