2023-07-12 09:48:21 +02:00
|
|
|
#!/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");
|
|
|
|
|
|
|
|
#--------------------------------------------------
|
2024-04-04 16:12:14 +02:00
|
|
|
# actions for smeserver-LPRng-update event
|
2023-07-12 09:48:21 +02:00
|
|
|
#--------------------------------------------------
|
|
|
|
|
2024-04-04 16:12:14 +02:00
|
|
|
my $event = "smeserver-LPRng-update";
|
2023-07-12 09:48:21 +02:00
|
|
|
|
|
|
|
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");
|
|
|
|
|