#!/bin/sh# Removes the line '192.168.20.1 OPNsense OPNsense.localdomain'sed -i '' '/192.168.20.1 OPNsense OPNsense.localdomain/d' /etc/hosts
chmod +x '/usr/local/my_custom_scripts/modify_etc_hosts.sh'
[modify_etc_hosts]command:/usr/local/my_custom_scripts/modify_etc_hosts.shparameters:type:scriptmessage:modifying /etc/hostsdescription:Modify /etc/hosts
service configd restart
cat /etc/hosts127.0.0.1 localhost localhost.localdomain::1 localhost localhost.localdomain192.168.20.1 OPNsense OPNsense.localdomain
nslookup opnsenseServer: 192.168.20.1Address: 192.168.20.1:53Non-authoritative answer:Name: opnsense.localdomainAddress: 192.168.20.1
cd /usr/local/my_custom_scripts./modify_etc_hosts.sh
cat /etc/hosts127.0.0.1 localhost localhost.localdomain::1 localhost localhost.localdomain
nslookup opnsenseServer: 192.168.30.1Address: 192.168.30.1:53Non-authoritative answer:Name: opnsense.localdomainAddress: 192.168.30.1Name: opnsense.localdomainAddress: 192.168.40.1Name: opnsense.localdomainAddress: 192.168.50.1Name: opnsense.localdomainAddress: 192.168.10.1Name: opnsense.localdomainAddress: 192.168.20.1