cron auto updates

This commit is contained in:
WickedYoda committed 2025-08-04 15:06:30 -05:00
1 parent 7c22fb694c
commit bcbc252715
2 files changed
+51 -15

No files matched your search

+36
View File
@@ -0,0 +1,36 @@
#!/bin/sh
echo "[+] Updating package list..."
opkg update
echo "[+] Installing iperf3..."
opkg install iperf3
echo "[+] Creating init script..."
cat << 'EOF' > /etc/init.d/iperf3-server
#!/bin/sh /etc/rc.common
# Custom init script to run iperf3 server on boot
START=99
start() {
logger -t iperf3 "Starting iperf3 server on boot"
iperf3 -s -D
}
stop() {
logger -t iperf3 "Stopping iperf3 server"
killall iperf3
}
EOF
echo "[+] Making script executable..."
chmod +x /etc/init.d/iperf3-server
echo "[+] Enabling iperf3 to start at boot..."
/etc/init.d/iperf3-server enable
echo "[+] Starting iperf3 server now..."
/etc/init.d/iperf3-server start
echo "[✓] iperf3 is now running and will auto-start on boot."