Files
smeserver-BackupPC/createlinks
Jean-Philippe Pialasse b2ab500ef3 * Thu Oct 30 2025 Jean-Philippe Pialasse <jpp@koozali.org> 0.2-22.sme
- remove sv files, rewrite systemd unit [SME: 11517]
- remove /var/log/httpd-bkpc/ [SME: 12197]
- remove logfiles2timestamp [SME: 12196]
2025-10-30 17:42:27 -04:00

52 lines
1.7 KiB
Perl

#!/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/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