Package: nodm Got an idea:
As there is a very high chance the user is using nodm at the time he runs apt-get upgrade etc. thinking ho-hum, just another upgrade of 50 packages... and an even higher chance if pidof nodm returns positive, and a good chance that he was browsing something important, and editing several files, so instead of making it like the power went out and restarted, why not have the update script, kindly ask the user "Ready to update nodm? First close all your windows...." via dialog(1) etc.