0

I want to run a bash or python script once when the ethernet cable is plugged in or out.

I am using CentOs 6.8;

  • I write a script and save as "ifup-pre-local" into "/sbin", it works only when I restart the network service. When I unplug/plug the cable, there is nothing.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.