+ new sh scripts
This commit is contained in:
35
scr/1_upd_install.sh
Executable file
35
scr/1_upd_install.sh
Executable 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/
|
||||
Reference in New Issue
Block a user