forked from finn/tinyboard
remove unused legacy scripts and rclone template
This commit is contained in:
@@ -1,8 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Need armbian-config?
|
||||
|
||||
apt install -y vim
|
||||
apt install -y autossh
|
||||
apt install -y docker.io docker-cli docker-compose
|
||||
usermod -aG docker armbian
|
||||
@@ -1,39 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Copy this along with .not_logged_in_yet to armbian root dir, then run after successful login
|
||||
|
||||
# Refresh: extract MAC address of wlan0
|
||||
MAC=$(netplan status -f json | jq -r '.wlan0.macaddress')
|
||||
|
||||
# Check that we actually got a MAC address
|
||||
if [[ -z "$MAC" ]]; then
|
||||
echo "Error: Could not retrieve MAC address from netplan." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Detected MAC address: $MAC"
|
||||
|
||||
# Assign cheese hostname based on MAC address
|
||||
case "$MAC" in
|
||||
38:9c:80:46:26:c8) # ← Replace with your first real MAC
|
||||
HOSTNAME="brie"
|
||||
;;
|
||||
68:f8:ea:22:e1:3d) # ← Replace with your second real MAC
|
||||
HOSTNAME="gouda"
|
||||
;;
|
||||
99:88:77:66:55:44) # ← Replace with your third real MAC
|
||||
HOSTNAME="camembert"
|
||||
;;
|
||||
*)
|
||||
echo "Unknown MAC address: $MAC ... hostname not changed." >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
echo "Setting hostname to: $HOSTNAME"
|
||||
sudo hostnamectl set-hostname "$HOSTNAME"
|
||||
|
||||
# Optional: also update /etc/hostname (hostnamectl usually does this, but to be safe)
|
||||
echo "$HOSTNAME" | sudo tee /etc/hostname >/dev/null
|
||||
|
||||
echo "Hostname changed. Reboot or start a new shell to see the change."
|
||||
@@ -1,22 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Script to clean sensitive WiFi credentials and passwords from configuration files
|
||||
# Usage: ./clean_sensitive.sh [filename]
|
||||
|
||||
FILE="${1:-/home/finn/code/tinyboard/armb-not_logged_in_yet}"
|
||||
|
||||
echo "Cleaning sensitive data from: $FILE"
|
||||
|
||||
# Clean WiFi SSID (both commented and uncommented lines)
|
||||
sed -i 's/^\(#*PRESET_NET_WIFI_SSID=\).*$/\1"[REDACTED]"/' "$FILE"
|
||||
|
||||
# Clean WiFi KEY (both commented and uncommented lines)
|
||||
sed -i 's/^\(#*PRESET_NET_WIFI_KEY=\).*$/\1"[REDACTED]"/' "$FILE"
|
||||
|
||||
# Clean root password
|
||||
sed -i 's/^\(PRESET_ROOT_PASSWORD=\).*$/\1"[REDACTED]"/' "$FILE"
|
||||
|
||||
# Clean user password
|
||||
sed -i 's/^\(PRESET_USER_PASSWORD=\).*$/\1"[REDACTED]"/' "$FILE"
|
||||
|
||||
echo "wiped fields"
|
||||
Reference in New Issue
Block a user