#!/usr/bin/perl -w use esmith::Build::CreateLinks qw(:all); # Panel links panel_link("backuppc", 'manager'); # Various symlinks # Event symlinks # our event specific for updating with yum without reboot $event = 'smeserver-BackupPC-update'; #Must match rpm name foreach my $file (qw(/etc/systemd/system-preset/49-koozali.preset /etc/httpd/conf/httpd.conf /etc/sudoers /etc/httpd/bkpc-conf/httpd.conf /etc/updatedb.conf )) { templates2events( $file, $event ); } #action needed in case we have a systemd unit event_link("systemd-default", $event, "10"); event_link("systemd-reload", $event, "50"); #action specific to this package event_link("backuppc-checkupgrade", $event, "20"); event_link("backuppc-genkey", $event, "10"); event_link("navigation2-conf", $event, "80"); event_link("routes2-conf", $event, "80"); event_link("backuppc-checkupgrade", "post-upgrade", "91"); event_link("backuppc-genkey", "post-upgrade", "90"); #services we need to restart #safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/backuppc"); safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/httpd-e-smith"); safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/httpd-bkpc"); safe_symlink("restart", "root/etc/e-smith/events/logrotate/services2adjust/httpd-bkpc"); # Create needed empty files safe_touch("root/etc/e-smith/events/logrotate/logfiles2timestamp/var/log/httpd/bkpc_access_log"); safe_touch("root/etc/e-smith/events/logrotate/logfiles2timestamp/var/log/httpd/bkpc_error_log"); safe_touch("root/var/service/httpd-bkpc/down"); use esmith::Build::Backup qw(:all); backup_includes("smeserver-BackupPC", qw( /etc/BackupPC )); # warning this could be a symlink to an external drive # also this will not backup the whole backups, but who would do that by default ? # /var/lib/BackupPC