#!/bin/bash # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # update, upgrade and install / frode klevstul / oct 2025 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - if [ "$EUID" -ne 0 ] then echo "error: run as 'root'" exit fi # --- # update server # --- apt update apt -y full-upgrade # --- # misc installations # trash-cli - used in misc scripts # nginx - webserver # --- apt -y install trash-cli nginx # --- # nginx # --- systemctl enable nginx # enable on startup # change mode so given dirs are writable by non-root user (which is nifty) chmod o+w /etc/nginx/sites-enabled/ chmod o+w /etc/nginx/sites-available/ chmod o+w /etc/nginx/nginx.conf chmod o+w /var/www/