restarting services if config files were changed

Thomas Lange lange at informatik.uni-koeln.de
Tue Sep 29 13:38:57 CEST 2009


>>>>> On Mon, 28 Sep 2009 21:29:44 +0200, Andreas Schuldei <andreas+linux-fai at schuldei.org> said:

    > i am in the process to create infrastructure for restarting
    > services which configuration files changed in the current
    > softupdate run.

    > currently i plan to set a flag (in an environment variable like
    > RESTART_FOO). since different services have different
    > restart/reload/whatnot commands i plan to put the restart/reload
    > command INTO the variable like this:
    > RESTART_FOO="/etc/init.d/FOO restart"

You may want to use the postinst script of fcopy(8) to write the
variables to a file. This postinst script will only be executed, if
fcopy changed the target file.
-- 
regards Thomas


More information about the linux-fai mailing list