Add in creatlinks and spec file and some extras

This commit is contained in:
2024-03-18 12:39:21 +00:00
parent 25474c4922
commit 26c6329404
6 changed files with 2587 additions and 60 deletions

73
createlinks Normal file → Executable file
View File

@@ -1,43 +1,54 @@
#!/usr/bin/perl -w
use esmith::Build::CreateLinks qw(:all);
use esmith::Build::Backup qw(:all);
use esmith::Build::CreateLinks qw(:all);
# our event specific for updating with yum without reboot
$event = 'smeserver-manager-panels-update';
#add here the path to your templates needed to expand
#see the /etc/systemd/system-preset/49-koozali.preset should be present for systemd integration on all you yum update event
#--------------------------------------------------
# functions for manager
#--------------------------------------------------
my $mngrdir = '/usr/share/smanager';
# Maybe need ths in here as well:
# /etc/dar/DailyBackup.dcf - if backup requested
foreach my $file (qw(
/etc/systemd/system-preset/49-koozali.preset
))
# templates to expand
for ( qw( sme_core.css sme_main.css sme_menu.css styles.css ) )
{
templates2events( $file, $event );
};
#action needed in case we have a systemd unit
event_link('systemd-default', $event, '10');
event_link('systemd-reload', $event, '50');
templates2events("$mngrdir/themes/default/public/css/$_", qw(
bootstrap-console-save smeserver-manager-update
));
}
#services we might need to restart
#event_services($event, 'xxxx' => 'restart', 'yyyy' => 'restart');
templates2events("$mngrdir/conf/srvmngr.conf",
qw( smeserver-manager-update smanager-theme-change smanager-modify bootstrap-console-save ));
#Backup contrib files
# backup_includes("smeserver-manager-panels", qw(
# files(s) to be backed up
#));
#Other possible entries:
#Server manager entry
#panel_link("smeserver-manager-panels", 'manager');
#Events to smeserver-manager-panels
#$event = 'smeserver-manager-panels-smeserver-manager-panels';
# safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/smeserver-manager-panels");
# templates2events("/etc/smeserver-manager-panels/smeserver-manager-panels.conf", $event);
templates2events("/etc/httpd/conf/httpd.conf",
qw( smeserver-manager-update smanager-modify ));
# services to launch on event
for my $event ( qw( smeserver-manager-update smanager-modify ) )
{
safe_symlink("restart",
"root/etc/e-smith/events/$event/services2adjust/smanager");
safe_symlink("reload",
"root/etc/e-smith/events/$event/services2adjust/httpd-e-smith");
}
safe_symlink("reload",
"root/etc/e-smith/events/smanager-theme-change/services2adjust/smanager");
safe_symlink("restart",
"root/etc/e-smith/events/smanager-refresh/services2adjust/smanager");
# actions to perform
for my $event ( qw( smeserver-manager-update smanager-refresh bootstrap-console-save ) )
{
event_link('navigation2-conf', "$event", '80');
event_link('routes2-conf', "$event", '80');
event_link('locales2-conf', "$event", '80');
}
event_link('systemd-default', "smeserver-manager-update", '88');
event_link('systemd-reload', "smeserver-manager-update", '89');
use esmith::Build::Backup qw(:all);
backup_includes("smeserver-manager", qw(
/usr/share/smanager/data
));