diff --git a/data/dnsfix.sh b/data/dnsfix.sh new file mode 100644 index 0000000..d83c48d --- /dev/null +++ b/data/dnsfix.sh @@ -0,0 +1,11 @@ +#!/bin/sh + +if command -v pkexec >/dev/null 2>&1; then + pkexec sh -c "echo \"nameserver 192.168.16.1\" | tee /etc/resolv.conf >/dev/null && sudo chattr +i /etc/resolv.conf" +elif command -v sudo >/dev/null 2>&1; then + sudo sh -c "echo \"nameserver 192.168.16.1\" | tee /etc/resolv.conf >/dev/null && sudo chattr +i /etc/resolv.conf" +elif command -v doas >/dev/null 2>&1; then + doas sh -c "echo \"nameserver 192.168.16.1\" | tee /etc/resolv.conf >/dev/null && sudo chattr +i /etc/resolv.conf" +else + su -c "echo \"nameserver 192.168.16.1\" | tee /etc/resolv.conf >/dev/null && sudo chattr +i /etc/resolv.conf" +fi diff --git a/data/index.html b/data/index.html index d07d647..dd8d7be 100644 --- a/data/index.html +++ b/data/index.html @@ -11,7 +11,10 @@

Welcome to VM Experiments!

Below you can download the required Certificate Authority.

You can import it on Firefox and in your operating system.

- Download Here! + Download Certificate Here! +
+

You can also download the DNS fix scriptlet here:

+ Download DNS Fix Here! \ No newline at end of file diff --git a/installation/ca.sh b/installation/ca.sh index bf8de5a..d4cf45e 100755 --- a/installation/ca.sh +++ b/installation/ca.sh @@ -10,4 +10,5 @@ sudo mkdir -p /var/www/html sudo cp ../data/index.html /var/www/html/ sudo cp /root/ca.crt /var/www/html/ sudo cp ../data/default.conf /etc/nginx/sites-available/default +tar -cvf /var/www/html/script.tar ../data/script.sh sudo systemctl restart nginx