diff -urN smeserver-hylafax-0.9.old/createlinks smeserver-hylafax-0.9/createlinks --- smeserver-hylafax-0.9.old/createlinks 2021-10-11 08:44:03.721092017 +0100 +++ smeserver-hylafax-0.9/createlinks 2021-10-11 13:19:55.151496770 +0100 @@ -1,10 +1,34 @@ #! /usr/bin/perl -w - use esmith::Build::CreateLinks qw(:all); -my $event; +# our event specific for updating with yum without reboot +my $event = 'smeserver-hylafax-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 your yum update event + +foreach my $file (qw( + /etc/systemd/system-preset/49-koozali.preset + /etc/hylafax/hyla.conf + /usr/lib/systemd/system/hylafax.service +)) +{ + 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/hylafax"); +#safe_symlink('restart',"root/etc/e-smith/events/$event/services2adjust/hylafax-faxgetty"); - not needed apparently + +#and Server Manager panel link +#panel_link('somefunction', 'manager'); -# Runlevel init links. + +# Runlevel init links - SME9 #service_link_enhanced("hylafax", "S95", "7"); #service_link_enhanced("hylafax", "K21", "6"); #service_link_enhanced("hylafax", "K21", "0"); #service_link_enhanced("hylafax", "K21", "1"); + diff -urN smeserver-hylafax-0.9.old/root/etc/e-smith/templates/etc/init/ttyS0.conf/85hylafax smeserver-hylafax-0.9/root/etc/e-smith/templates/etc/init/ttyS0.conf/85hylafax --- smeserver-hylafax-0.9.old/root/etc/e-smith/templates/etc/init/ttyS0.conf/85hylafax 2021-10-11 08:44:03.718091987 +0100 +++ smeserver-hylafax-0.9/root/etc/e-smith/templates/etc/init/ttyS0.conf/85hylafax 1970-01-01 01:00:00.000000000 +0100 @@ -1,14 +0,0 @@ -{ - my $status = $hylafax{status} || "enabled"; - my $port = $hylafax{port} || "ttyS0"; - - if ($status eq 'enabled') - { - $OUT .= "start on runlevel [2345]\n"; - $OUT .= "stop on runlevel [S016]\n"; - $OUT .= " \n"; - $OUT .= "respawn\n"; - $OUT .= "instance /dev/$port\n"; - $OUT .= "exec /usr/sbin/faxgetty $port\n"; - } -} \ No newline at end of file diff -urN smeserver-hylafax-0.9.old/root/etc/e-smith/templates/usr/lib/systemd/system/hylafax.service/20unit smeserver-hylafax-0.9/root/etc/e-smith/templates/usr/lib/systemd/system/hylafax.service/20unit --- smeserver-hylafax-0.9.old/root/etc/e-smith/templates/usr/lib/systemd/system/hylafax.service/20unit 1970-01-01 01:00:00.000000000 +0100 +++ smeserver-hylafax-0.9/root/etc/e-smith/templates/usr/lib/systemd/system/hylafax.service/20unit 2021-10-11 13:18:54.500957479 +0100 @@ -0,0 +1,26 @@ +{ +my $port = $hylafax{port} || "ttyS0"; + +$OUT .= "[Unit]\n"; +$OUT .= "Description=faxgetty on /dev/$port\n"; +$OUT .= "Documentation=man:faxgetty(8)\n"; +$OUT .= "BindsTo=dev-$port.device\n"; +$OUT .= "After=dev-$port.device systemd-user-sessions.service plymouth-quit-wait.service\n"; +$OUT .= "After=rc-local.service\n"; +$OUT .= "Before=sme-server.target\n"; +$OUT .= "IgnoreOnIsolate=yes\n"; +$OUT .= "\n"; +$OUT .= "[Service]\n"; +$OUT .= "ExecStart=-/usr/sbin/faxgetty /dev/$port\n"; +$OUT .= "Type=idle\n"; +$OUT .= "Restart=always\n"; +$OUT .= "RestartSec=0\n"; +$OUT .= "UtmpIdentifier=$port\n"; +$OUT .= "TTYPath=/dev/$port\n"; +$OUT .= "KillMode=process\n"; +$OUT .= "IgnoreSIGPIPE=no\n"; +$OUT .= "\n"; +$OUT .= "[Install]\n"; +$OUT .= "WantedBy=sme-server.target\n"; +$OUT .= "\n"; +} diff -urN smeserver-hylafax-0.9.old/root/usr/lib/systemd/system/hylafax-faxgetty@.service.d/51koozali.conf smeserver-hylafax-0.9/root/usr/lib/systemd/system/hylafax-faxgetty@.service.d/51koozali.conf --- smeserver-hylafax-0.9.old/root/usr/lib/systemd/system/hylafax-faxgetty@.service.d/51koozali.conf 1970-01-01 01:00:00.000000000 +0100 +++ smeserver-hylafax-0.9/root/usr/lib/systemd/system/hylafax-faxgetty@.service.d/51koozali.conf 2021-10-11 09:43:55.000000000 +0100 @@ -0,0 +1,5 @@ +[Service] +# we do not allow mulitple instance on Koozali SME Server +ExecStart= +ExecStart=/bin/false +