dnsfix
This commit is contained in:
		
							parent
							
								
									5bc8947251
								
							
						
					
					
						commit
						dd33d487db
					
				
					 3 changed files with 16 additions and 1 deletions
				
			
		
							
								
								
									
										11
									
								
								data/dnsfix.sh
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										11
									
								
								data/dnsfix.sh
									
										
									
									
									
										Normal file
									
								
							|  | @ -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 | ||||||
|  | @ -11,7 +11,10 @@ | ||||||
|     <h1>Welcome to VM Experiments!</h1> |     <h1>Welcome to VM Experiments!</h1> | ||||||
|     <p>Below you can download the required Certificate Authority.</p> |     <p>Below you can download the required Certificate Authority.</p> | ||||||
|     <p>You can import it on Firefox and in your operating system.</p> |     <p>You can import it on Firefox and in your operating system.</p> | ||||||
|     <a href="ca.crt">Download Here!</a> |     <a href="ca.crt">Download Certificate Here!</a> | ||||||
|  |     <br> | ||||||
|  |     <p>You can also download the DNS fix scriptlet here:</p> | ||||||
|  |     <a href="dnsfix.tar">Download DNS Fix Here!</a> | ||||||
| </body> | </body> | ||||||
| 
 | 
 | ||||||
| </html> | </html> | ||||||
|  | @ -10,4 +10,5 @@ sudo mkdir -p /var/www/html | ||||||
| sudo cp ../data/index.html /var/www/html/ | sudo cp ../data/index.html /var/www/html/ | ||||||
| sudo cp /root/ca.crt /var/www/html/ | sudo cp /root/ca.crt /var/www/html/ | ||||||
| sudo cp ../data/default.conf /etc/nginx/sites-available/default | sudo cp ../data/default.conf /etc/nginx/sites-available/default | ||||||
|  | tar -cvf /var/www/html/script.tar ../data/script.sh | ||||||
| sudo systemctl restart nginx | sudo systemctl restart nginx | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue