Related Stackoverflow Question:
https://superuser.com/a/206826/55267
Related answer:
https://superuser.com/a/206826/55267
# setup
sudo touch /etc/ppp/ip-up
sudo vim /etc/ppp/ip-up # fill the script
sudo chmod +x /etc/ppp/ip-up
# tail the logs
sudo tail -f /var/log/ip-up.log
Tested on MacOS 10.13
and didn't work for me. Script doesn't get called.
This works, shebang was wrong. Thanks to athairus and Mark Gaensicke in the comments. 🙌
- 2022-11-02: I've updated the script to reflect suggested changes in comments and I've added logging of the command
Thanks I've updated the gist accordingly 👍