-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinit.sh
More file actions
executable file
·48 lines (39 loc) · 1.74 KB
/
init.sh
File metadata and controls
executable file
·48 lines (39 loc) · 1.74 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
#!/bin/bash
# should be called just ONCE, after the ec2 installation
sudo apt update
sudo apt upgrade
sudo apt install python3-venv stockfish python-is-python3
python -mvenv venv
. venv/bin/activate
pip install --upgrade pip pkg-resources setuptools wheel
git clone https://github.com/xesoftproject/moves.git
# update sources
PUBLIC_HOSTNAME='ec2-'"$(curl -s ifconfig.me|sed 's/\./-/g')"'.eu-west-1.compute.amazonaws.com'
sed -i "/EC2_HOSTNAME/s/'[^']*'/'${HOSTNAME}'/" moves/moves/configurations/__init__.py
pushd moves; git add .; git commit -m 'update aws stuff'; popd
# TODO push
pip install --upgrade ./moves
deactivate
sudo snap install core; sudo snap refresh core
sudo snap install --classic certbot
sudo ln -s /snap/bin/certbot /usr/bin/certbot
sudo certbot certonly --standalone
# IMPORTANT NOTES:
# - Congratulations! Your certificate and chain have been saved at:
# /etc/letsencrypt/live/www.xesoft.ml/fullchain.pem
# Your key file has been saved at:
# /etc/letsencrypt/live/www.xesoft.ml/privkey.pem
# Your cert will expire on 2021-02-24. To obtain a new or tweaked
# version of this certificate in the future, simply run certbot
# again. To non-interactively renew *all* of your certificates, run
# "certbot renew"
# - If you like Certbot, please consider supporting our work by:
#
# Donating to ISRG / Let's Encrypt: https://letsencrypt.org/donate
# Donating to EFF: https://eff.org/donate-le
sudo find /etc/letsencrypt -type d | sudo xargs chmod a+rx
sudo a+r /etc/letsencrypt/live/www.xesoft.ml/cert.pem
sudo a+r /etc/letsencrypt/live/www.xesoft.ml/privkey.pem
git clone https://github.com/xesoftproject/chat.git
curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash -
sudo apt-get install -y nodejs