78 lines
2.6 KiB
Perl
Executable File
78 lines
2.6 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 e-smith-LPRng-update event
|
|
#--------------------------------------------------
|
|
|
|
my $event = "e-smith-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");
|
|
|
|
#--------------------------------------------------
|
|
# remove for systemd
|
|
## Make service statup symlinks
|
|
#safe_symlink("../daemontools", "root/etc/rc.d/init.d/supervise/lpd");
|
|
#safe_symlink("/etc/rc.d/init.d/e-smith-service", "root/etc/rc.d/rc7.d/S60lpd");
|
|
safe_symlink("/var/service/lpd", "root/service/lpd");
|