Re: [BackupPC-users] restart automatically a service
2010-05-27 18:30:29
Or if you are into overkill (or have other tasks that you want to manage semi-centrally), you might want to take a look at cfengine. For those that are not familiar, cfengine is less of a configuration management tool than it is a "promise engine." By that, I mean that you give it promises, such as (keeping it in a backuppc vein) insuring that backuppc is running, or the config file is the same as the "golden copy." You can even make sure that certain lines are present in files.
Cfengine2 is somewhat deprecated, but there is a lot of documentation for it (online, books, etc.) but cfengine3, the up and comer is under *heavy* development. It has a completely rewritten scripting language, and it is much better than cf2, once you get your brain around it.
A quick cfengine2 stanza would be something similar to:
control: AddInstallable = ( restartbackuppc )
processes: "dhcp3" restart "/etc/init.d/dhcp3-server start"
This is very basic usage, since you could also use it to manage your config files, as well as other things on your system.
Currently I use it to manage apticron (on my Debian and Ubuntu boxes), cfengine itself, dhcp server, the motd, ntp, snmp, ssh, syslog-ng and am slowly growing it to manage other functions. Its really worth a look.
--b
------------------------------------------------------------------------------
_______________________________________________
BackupPC-users mailing list
BackupPC-users AT lists.sourceforge DOT net
List: https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki: http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/
|
|
|