Customisation script?

You may use the post-up and post-down hooks to do so?
see man interfaces(5)