Bash script to replace externhost functionality