1 1
AlterX

Start a script when an interface is up

Recommended Posts

Thank you so much, although it doesn't seem to trigger my script. This is my script with +x located in dispatcher.d:

if [ "$1" == "eth0" ]; then
        case "$2" in
                up)
                ~/scripts/start_check.sh
                ;;
        esac
fi;

 

Share this post


Link to post
Share on other sites

Or I am using it in a wrong way or this is really a bug in the system since just putting in the script:

logger -s "I DON'T SEE THIS"

and switching off interfaces around I don't see it in syslog file. The only time I see that phrase is when I do restart of NetworkManager service.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
1 1