72 lines
2.3 KiB
Perl
Executable File
72 lines
2.3 KiB
Perl
Executable File
#!/usr/bin/perl -w
|
|
|
|
use esmith::Build::CreateLinks qw(:all);
|
|
|
|
#--------------------------------------------------
|
|
# functions for manager panel
|
|
#--------------------------------------------------
|
|
my $panel = "manager";
|
|
|
|
panel_link("printers", $panel);
|
|
|
|
#--------------------------------------------------
|
|
# actions for printer-create event
|
|
#--------------------------------------------------
|
|
|
|
$event = "printer-create";
|
|
|
|
event_link("printer-create", $event, "15");
|
|
templates2events("/etc/printcap", $event);
|
|
safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/lpd");
|
|
|
|
#--------------------------------------------------
|
|
# actions for printer-delete event
|
|
#--------------------------------------------------
|
|
|
|
$event = "printer-delete";
|
|
|
|
event_link("printer-delete", $event, "15");
|
|
templates2events("/etc/printcap", $event);
|
|
safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/lpd");
|
|
|
|
#--------------------------------------------------
|
|
# actions for network-create event
|
|
#--------------------------------------------------
|
|
|
|
$event = "network-create";
|
|
|
|
templates2events("/etc/lpd/lpd.perms", $event);
|
|
safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/lpd");
|
|
|
|
#--------------------------------------------------
|
|
# actions for network-delete event
|
|
#--------------------------------------------------
|
|
|
|
$event = "network-delete";
|
|
|
|
templates2events("/etc/lpd/lpd.perms", $event);
|
|
safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/lpd");
|
|
|
|
#--------------------------------------------------
|
|
# actions for bootstrap-console-save event
|
|
#--------------------------------------------------
|
|
|
|
my $event = "bootstrap-console-save";
|
|
|
|
templates2events("/etc/lpd/lpd.perms", $event);
|
|
templates2events("/etc/printcap", $event);
|
|
event_link("printer-create", $event, "15");
|
|
|
|
#--------------------------------------------------
|
|
# actions for smeserver-LPRng-update event
|
|
#--------------------------------------------------
|
|
|
|
my $event = "smeserver-LPRng-update";
|
|
|
|
templates2events("/etc/lpd/lpd.perms", $event);
|
|
templates2events("/etc/printcap", $event);
|
|
safe_symlink("try-restart", "root/etc/e-smith/events/$event/services2adjust/lpd");
|
|
templates2events("/etc/systemd/system-preset/49-koozali.preset", $event);
|
|
event_link("systemd-default", $event, "06");
|
|
|