modfiy custom stage run script
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
set -e
|
||||
|
||||
# Install Docker (official instructions for Raspberry Pi OS)
|
||||
curl -fsSL https://download.docker.com/linux/raspbian/gpg | gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
|
||||
curl -fsSL https://download.docker.com/linux/debian/gpg | gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
|
||||
|
||||
apt-get update && apt-get install -y lsb-release
|
||||
|
||||
@@ -12,22 +12,38 @@ echo \
|
||||
apt-get update
|
||||
apt-get install -y docker-ce docker-ce-cli containerd.io docker-compose-plugin
|
||||
|
||||
systemctl enable docker || true
|
||||
|
||||
# Ensure docker group exists and add main user to it
|
||||
DOCKER_GROUP=docker
|
||||
if ! getent group "$DOCKER_GROUP" > /dev/null; then
|
||||
groupadd "$DOCKER_GROUP"
|
||||
fi
|
||||
# Use FIRST_USER_NAME if set, else default to 'pi'
|
||||
USER_TO_ADD="${FIRST_USER_NAME:-pi}"
|
||||
usermod -aG "$DOCKER_GROUP" "$USER_TO_ADD" || true
|
||||
|
||||
docker compose version || true
|
||||
|
||||
# Install Python Poetry (official installer)
|
||||
apt-get update
|
||||
apt-get install -y python3
|
||||
curl -sSL https://install.python-poetry.org | python3 -
|
||||
# Make Poetry available to all users
|
||||
ln -sf /root/.local/bin/poetry /usr/local/bin/poetry
|
||||
|
||||
# Install WireGuard
|
||||
apt-get install -y wireguard
|
||||
apt-get install -y wireguard wireguard-tools
|
||||
|
||||
# Disable WiFi (rfkill block and mask wpa_supplicant)
|
||||
rfkill block wifi || true
|
||||
# Disable WiFi
|
||||
# Option 1: Mask wpa_supplicant (prevents WiFi client connections)
|
||||
systemctl mask wpa_supplicant.service || true
|
||||
# Optionally, remove wpa_supplicant package
|
||||
# Option 2: Remove wpa_supplicant package (removes WiFi client capability)
|
||||
# apt-get remove -y wpa_supplicant
|
||||
# Option 3: (Optional, not always necessary) Block WiFi radio with rfkill
|
||||
apt-get install -y rfkill && rfkill block wifi || true
|
||||
# Note: rfkill is not strictly necessary if you mask/remove wpa_supplicant, but it disables the radio at a lower level.
|
||||
|
||||
# Disable Bluetooth service
|
||||
systemctl mask bluetooth.service || true
|
||||
systemctl disable hciuart.service || true
|
||||
|
||||
touch /root/CUSTOM_STAGE_WORKED
|
||||
|
||||
Reference in New Issue
Block a user