Update NewServerSetup.sh

This commit is contained in:
2026-03-24 16:33:58 -05:00
parent 9df73d30b6
commit 563bbfa2cc

View File

@@ -66,6 +66,29 @@ sudo systemctl enable --now docker
sudo apt install unattended-upgrades
sudo dpkg-reconfigure unattended-upgrades
# --- CONFIG ---
SERVER_IP="192.168.20.5"
REMOTE_PATH="/mnt/HomeStorage02/DockerSwarmStorage"
LOCAL_MOUNT="/mnt/DockerStorage"
FSTAB_ENTRY="${SERVER_IP}:${REMOTE_PATH} ${LOCAL_MOUNT} nfs rw,vers=4,sync 0 0"
echo "Updating system..."
sudo apt update -y
echo "Installing nfs-common..."
sudo apt install -y nfs-common
echo "Creating local mount point at ${LOCAL_MOUNT}..."
sudo mkdir -p "${LOCAL_MOUNT}"
echo "Updating fstab..."
echo "${FSTAB_ENTRY}" >> /etc/fstab
echo "Testing fstab mounts..."
sudo mount -a
echo "Done!"
echo "NFS share should now be mounted at ${LOCAL_MOUNT}"
echo "Docker is installed user docker -v to check"
echo "unattended logs can be found at /var/log/unattended-upgrades/"
echo "You can access Cockpit at: https://localhost:9090"