From 95044cd5f8e4aedaef7717d3156c65286205e32d Mon Sep 17 00:00:00 2001
From: Tine <tine@tjo.space>
Date: Sun, 23 Mar 2025 18:54:54 +0100
Subject: [PATCH] feat: network init script

---
 network.tjo.cloud/README.md                        | 3 ++-
 network.tjo.cloud/scripts/openwrt-initial-setup.sh | 5 +++++
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/network.tjo.cloud/README.md b/network.tjo.cloud/README.md
index 76c7791..a4c8d63 100644
--- a/network.tjo.cloud/README.md
+++ b/network.tjo.cloud/README.md
@@ -92,7 +92,8 @@ service network restart
 Ref: https://github.com/adyanth/openwrt-tailscale-enabler
 
 ```
-wget -0 - https://code.tjo.space/tjo-cloud/infrastructure/raw/branch/main/network.tjo.cloud/scripts/openwrt-initial-setup.sh | bash
+wget -O - https://code.tjo.space/tjo-cloud/infrastructure/raw/branch/main/network.tjo.cloud/scripts/openwrt-initial-setup.sh > initial.sh
+sh initial.sh
 ```
 
 ### 6. Configure.
diff --git a/network.tjo.cloud/scripts/openwrt-initial-setup.sh b/network.tjo.cloud/scripts/openwrt-initial-setup.sh
index b911ef4..db934c3 100755
--- a/network.tjo.cloud/scripts/openwrt-initial-setup.sh
+++ b/network.tjo.cloud/scripts/openwrt-initial-setup.sh
@@ -7,8 +7,13 @@ opkg update
 opkg install qemu-ga
 
 # TAILSCALE
+# Ref: https://github.com/adyanth/openwrt-tailscale-enabler/tree/v1.60.0-e428948-autoupdate
 opkg install ca-bundle kmod-tun iptables-nft kmod-ipt-conntrack kmod-ipt-conntrack-extra kmod-ipt-conntrack-label kmod-ipt-nat kmod-nft-nat
 
+wget https://github.com/adyanth/openwrt-tailscale-enabler/releases/download/v1.60.0-e428948-autoupdate/openwrt-tailscale-enabler-v1.60.0-e428948-autoupdate.tgz -o /tmp/tailscale-enabler.tgz
+
+tar x -zvC / -f /tmp/tailscale-enabler.tgz
+
 /etc/init.d/tailscale start
 /etc/init.d/tailscale enable