# 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