From 275f41caa7e0354d393f3deeab343abaa7895c19 Mon Sep 17 00:00:00 2001 From: finn Date: Sat, 11 Apr 2026 00:55:20 -0700 Subject: [PATCH] hostname automation --- aptprimary.sh | 7 +++++++ armb-not_logged_in_yet | 10 ++++++++++ 2 files changed, 17 insertions(+) create mode 100755 aptprimary.sh diff --git a/aptprimary.sh b/aptprimary.sh new file mode 100755 index 0000000..c6e0e28 --- /dev/null +++ b/aptprimary.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +# Need armbian-config? + +apt install -y vim git + +apt install -y docker.io docker-cli docker-compose diff --git a/armb-not_logged_in_yet b/armb-not_logged_in_yet index 0e6a654..501139a 100644 --- a/armb-not_logged_in_yet +++ b/armb-not_logged_in_yet @@ -33,3 +33,13 @@ PRESET_USER_PASSWORD="[REDACTED]" PRESET_USER_KEY="" PRESET_DEFAULT_REALNAME="Armbian user" PRESET_USER_SHELL="bash" + +# ========================================== +# Set the Hostname +# ========================================== +NEW_HOSTNAME="opi1" # <-- Replace with your desired hostname + +echo "Setting hostname to $NEW_HOSTNAME" +echo "$NEW_HOSTNAME" > /etc/hostname +hostname -b "$NEW_HOSTNAME" +sed -i "s/127.0.1.1.*/127.0.1.1\t$NEW_HOSTNAME/g" /etc/hosts