debian scripts from 7040

This commit is contained in:
2025-12-28 20:18:55 -07:00
parent b351cbddfb
commit 23987b2087
4 changed files with 92 additions and 0 deletions
Vendored Executable
+33
View File
@@ -0,0 +1,33 @@
#!/bin/bash
# Ensure the script is run as root
if [ "$EUID" -ne 0 ]; then
echo "Please run as root or use sudo"
exit 1
fi
# Install resolvconf
apt update && apt install -y resolvconf
# Enable and start resolvconf service
systemctl enable resolvconf
systemctl start resolvconf
# Check service status
systemctl status resolvconf --no-pager
# Update resolv.conf head file
cat <<EOF > /etc/resolvconf/resolv.conf.d/head
nameserver 8.8.8.8
nameserver 8.8.4.4
EOF
# Apply changes
resolvconf --enable-updates
resolvconf -u
# Confirm changes
echo "Updated resolv.conf file:"
cat /etc/resolv.conf
echo "resolvconf setup completed successfully."