I have a simple script "test" in /etc/network/if-up.d
directory. The script contains below commands. It creates a empty text file, whenever an interfaces changes state from down to up.
#!/bin/bash
sudo touch /home/duser/test1.txt
But the script is not executing when ppp connection is established. The ppp connection belongs to an usb-modem. The pppd daemon will be initiated by wvdial. I tried disconnecting and connecting my wlan, then the script is executing. But it doesn't work for ppp. Note: The script have 755 permission
/etc/ppp/ip-up.d
instead, if the script is specifically forppp
.