diff options
author | mario <mario@slackverse.org> | 2010-04-16 22:07:14 -0400 |
---|---|---|
committer | David Somero <xgizzmo@slackbuilds.org> | 2010-05-15 10:38:11 +0200 |
commit | cc132de15ed8de387655cb1078867a7ca9590496 (patch) | |
tree | 3e04edb21c45c9f9509b7a91451dae15648612c9 /system/bacula/doinst.sh | |
parent | 89561721635655f34b446a885bdd0f2ede45bc95 (diff) | |
download | slackbuilds-cc132de15ed8de387655cb1078867a7ca9590496.tar.gz |
system/bacula: Added (managed backup and recovery)
Diffstat (limited to 'system/bacula/doinst.sh')
-rw-r--r-- | system/bacula/doinst.sh | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/system/bacula/doinst.sh b/system/bacula/doinst.sh new file mode 100644 index 0000000000..7e77f15f03 --- /dev/null +++ b/system/bacula/doinst.sh @@ -0,0 +1,27 @@ +config() { + NEW="$1" + OLD="$(dirname $NEW)/$(basename $NEW .new)" + # If there's no config file by that name, mv it over: + if [ ! -r $OLD ]; then + mv $NEW $OLD + elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then + # toss the redundant copy + rm $NEW + fi + # Otherwise, we leave the .new copy for the admin to consider... +} + +# Keep same perms on rc.bacula.new: +if [ -e etc/rc.d/rc.bacula ]; then + cp -a etc/rc.d/rc.bacula etc/rc.d/rc.bacula.new.incoming + cat etc/rc.d/rc.bacula.new > etc/rc.d/rc.bacula.new.incoming + mv etc/rc.d/rc.bacula.new.incoming etc/rc.d/rc.bacula.new +fi + +config etc/bacula/bacula-dir.conf.new +config etc/bacula/bacula-fd.conf.new +config etc/bacula/bacula-sd.conf.new +config etc/bacula/bconsole.conf.new +config etc/logrotate.d/bacula.new +config etc/rc.d/rc.bacula.new + |