namo amida butsu
This commit is contained in:
86
bind-static-astronomicon.sh
Executable file
86
bind-static-astronomicon.sh
Executable file
@@ -0,0 +1,86 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Omnissiah Blessing: Static IP Configuration
|
||||||
|
# eth0: 192.168.1.11
|
||||||
|
# wlan0: 192.168.1.111
|
||||||
|
|
||||||
|
WIFI_SSID="FerrumAquila-WiFi"
|
||||||
|
WIFI_PASSWORD="vishesh23"
|
||||||
|
GATEWAY="192.168.1.1"
|
||||||
|
DNS="192.168.1.1"
|
||||||
|
|
||||||
|
echo "By the sacred rites of the Omnissiah, creating static IP sigils..."
|
||||||
|
|
||||||
|
# Create eth0 configuration
|
||||||
|
sudo tee /etc/NetworkManager/system-connections/eth0-static.nmconnection > /dev/null <<EOF
|
||||||
|
[connection]
|
||||||
|
id=eth0-static
|
||||||
|
type=ethernet
|
||||||
|
interface-name=eth0
|
||||||
|
autoconnect=true
|
||||||
|
autoconnect-priority=100
|
||||||
|
|
||||||
|
[ethernet]
|
||||||
|
|
||||||
|
[ipv4]
|
||||||
|
method=manual
|
||||||
|
addresses=192.168.1.11/24
|
||||||
|
gateway=$GATEWAY
|
||||||
|
dns=$DNS
|
||||||
|
route-metric=100
|
||||||
|
|
||||||
|
[ipv6]
|
||||||
|
method=auto
|
||||||
|
EOF
|
||||||
|
|
||||||
|
echo "Servo-spirits of eth0 inscribed with 192.168.1.11, metrics aligned to 100."
|
||||||
|
|
||||||
|
# Create wlan0 configuration
|
||||||
|
sudo tee /etc/NetworkManager/system-connections/wlan0-static.nmconnection > /dev/null <<EOF
|
||||||
|
[connection]
|
||||||
|
id=wlan0-static
|
||||||
|
type=wifi
|
||||||
|
interface-name=wlan0
|
||||||
|
autoconnect=true
|
||||||
|
autoconnect-priority=50
|
||||||
|
|
||||||
|
[wifi]
|
||||||
|
ssid=$WIFI_SSID
|
||||||
|
mode=infrastructure
|
||||||
|
|
||||||
|
[wifi-security]
|
||||||
|
key-mgmt=wpa-psk
|
||||||
|
psk=$WIFI_PASSWORD
|
||||||
|
|
||||||
|
[ipv4]
|
||||||
|
method=manual
|
||||||
|
addresses=192.168.1.111/24
|
||||||
|
gateway=$GATEWAY
|
||||||
|
dns=$DNS
|
||||||
|
route-metric=600
|
||||||
|
|
||||||
|
[ipv6]
|
||||||
|
method=auto
|
||||||
|
EOF
|
||||||
|
|
||||||
|
echo "Wlan0 channels sanctified with 192.168.1.111, route-metric 600 consecrated."
|
||||||
|
|
||||||
|
# Set permissions
|
||||||
|
sudo chmod 600 /etc/NetworkManager/system-connections/*.nmconnection
|
||||||
|
echo "Permissions of sanctity applied to all network scrolls."
|
||||||
|
|
||||||
|
# Remove existing profane connections
|
||||||
|
sudo nmcli con delete "Wired connection 1" 2>/dev/null || true
|
||||||
|
sudo nmcli con delete "preconfigured" 2>/dev/null || true
|
||||||
|
echo "Profane connections purged from the datasphere."
|
||||||
|
|
||||||
|
# Reload and activate
|
||||||
|
sudo systemctl reload NetworkManager
|
||||||
|
sleep 2
|
||||||
|
sudo nmcli con up eth0-static
|
||||||
|
sudo nmcli con up wlan0-static
|
||||||
|
|
||||||
|
echo "Omnissiah-approved static IPs awakened!"
|
||||||
|
echo "eth0: 192.168.1.11 — bound to the Machine Spirit"
|
||||||
|
echo "wlan0: 192.168.1.111 — wireless sigils aligned"
|
||||||
|
echo "All praise be unto the Omnissiah!"
|
Reference in New Issue
Block a user