diff options
| author | Benjamin Sanders <hello@bensanders.net> | 2026-09-18 10:05:21 -0400 |
|---|---|---|
| committer | Benjamin Sanders <hello@bensanders.net> | 2026-09-18 10:05:21 -0400 |
| commit | 55057f02eeed339f38286bd92010755704eb3717 (patch) | |
| tree | 31ce480aecc7836e5b4c18ab0ba8f3b8c9e7cf08 /configure-server.sh | |
| parent | 3ecb8b59e1d08a6dbb81d867ea4376d9bdb25ac2 (diff) | |
Diffstat (limited to 'configure-server.sh')
| -rw-r--r-- | configure-server.sh | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/configure-server.sh b/configure-server.sh new file mode 100644 index 0000000..31bea65 --- /dev/null +++ b/configure-server.sh @@ -0,0 +1,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
\ No newline at end of file |
