# Trigger script execution on after apt-get upgrade for a certain package?

Question:

I have customized an application startup script. Unfortunately, it gets overwritten every time I do

apt-get dist-upgrade


when there is an update available (quite often).

Now I have written a script that makes a backup copy of the original, then modifies the original and merges my changes.

Now my question: How can I trigger a script execution after a package has been updated ?

-

If this is an init script, you can usually make your tweaks in /etc/default/\$PKG_NAME. Otherwise, you can use dpkg-divert to stop dpkg from touching the file.