drist-etc_hosts

drist script to update local and remote /etc/hosts
git clone git://git.pyratebeard.net/drist-etc_hosts.git
Log | Files | Refs

script (404B)


      1 #!/usr/bin/zsh
      2 
      3 if [[ $(hostname -s) == "laundry" ]] ; then
      4 	cat default.hosts local.hosts remote.hosts | sudo tee /etc/hosts >/dev/null
      5 	sudo chown root:root /etc/hosts
      6 	sudo chmod 644 /etc/hosts
      7 	sudo systemctl restart dnsmasq
      8 fi
      9 
     10 if [[ $(hostname -s) == "nublar" ]] ; then
     11 	cat default.hosts remote.hosts | sudo tee /etc/hosts >/dev/null
     12 	sudo chown root:root /etc/hosts
     13 	sudo chmod 644 /etc/hosts
     14 fi