Got an error running this script.
225:412: execution error: System Events got an error: Can’t get window "Sharing" of process "System Preferences". (-1728)
NAT file created
NAT file edited
234:421: execution error: System Events got an error: Can’t get window "Sharing" of process "System Preferences". (-1728)
ICS started
IP on en0 set to 172.16.42.42
Ethernet is not a recognized network service.
** Error: The parameters were not valid.
Set Primary DNS to 8.8.8.8 Alternate to 8.8.4.4
Made backup directory for completed config files
cp: /etc/bootpd.plist: No such file or directory
Copied completed config files
I'm running the latest version of OSX Yosemite (10.10.2) with latest security updates.
Terminal app is added to the list in the Accessibility menu.
When launching the script, before any output in the terminal appears, the "Sharing" panel (in the System and Preferences app) shows up.