Marty wrote: There is a
dedicated Debian package called guarddog which produces such a script. You might want to take a look at its docs to get an idea of what's required.
Sorry, I meant guidedog, not guarddog.