+ new sh scripts

This commit is contained in:
fro
2025-10-26 21:56:12 -05:00
parent 29c42b55e7
commit a510d4354c
3 changed files with 82 additions and 0 deletions

35
scr/1_upd_install.sh Executable file
View File

@@ -0,0 +1,35 @@
#!/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/