blob: 31bea65b257f7bb8bbab0752a1c532077c169873 (
plain)
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
|
# This is a rudimentary script to configure an image node
# Start by updating cache and installing needed packages
sudo apt update && sudo apt install imagemagick nginx vim git sudo python3-certbot-nginx -y
# Created needed configuration files
# First the NGINX config file
# Second the file to process images
touch /etc/nginx/conf.d/pbs-bsimg-net.conf
touch /usr/local/bin/bsimg-process.sh
# Make the image processor file executable
chmod +x /usr/local/bin/bsimg-process.sh
# Add my username to the www-data and ensure the group owns the directory
# so I can upload files
usermod -aG www-data ben
usermod -aG sudo ben
chown -R www-data:www-data /var/www/html/
# Attempt to get TLS certs
# Replace {region} with state/country code of region the vm is located
certbot -d bsimg.net -d pbs.atl.bsimg.net -d pbs.bsimg.net -d pbs.{region}.bsimg.net
# Restart NGINX
systemctl restart nginx.service
|