smeserver-print-monitor/createlinks

39 lines
1.6 KiB
Perl

#!/usr/bin/perl -w
use esmith::Build::CreateLinks qw(:all);
# our event specific for updating with yum without reboot
$event = 'smeserver-print-monitor-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
foreach my $file (qw(
/etc/systemd/system-preset/49-koozali.preset
/etc/httpd/conf/httpd.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('action', $event, '30');
#services we need to restart
safe_symlink('restart',"root/etc/e-smith/events/$event/services2adjust/httpd-e-smith");
#and Server Manager panel link
#panel_link('somefunction', 'manager');
# This script creates the symlinks needed by this RPM
# Specific support exists to create symlinks within e-smith web "panels"
# and for links from named "events" directories into the "actions" directory
panel_link("LPRng", 'manager');
safe_symlink("../../cgi-bin/lpinfo", "root/var/www/html/LPRng/admin/cgi-bin/lpinfo");
safe_symlink("../../cgi-bin/lpinfo_lprm", "root/var/www/html/LPRng/admin/cgi-bin/lpinfo_lprm");
safe_symlink("../bottom.html", "root/var/www/html/LPRng/admin/bottom.html");
safe_symlink("../index.html", "root/var/www/html/LPRng/admin/index.html");
safe_symlink("../middle.html", "root/var/www/html/LPRng/admin/middle.html");
safe_symlink("/etc/printcap", "root/usr/local/lprng/etc/printcap");