diff -Nur e-smith-manager-2.8.0.old/createlinks e-smith-manager-2.8.0/createlinks --- e-smith-manager-2.8.0.old/createlinks 2020-12-10 22:38:26.769000000 -0500 +++ e-smith-manager-2.8.0/createlinks 2020-12-10 22:55:30.899000000 -0500 @@ -18,6 +18,7 @@ { templates2events("/etc/e-smith/web/common/css/$_", qw( bootstrap-console-save + e-smith-manager-update )); } @@ -27,6 +28,7 @@ network-create network-delete logrotate + e-smith-manager-update )); templates2events("/etc/e-smith/web/common/head.tmpl", qw( console-save @@ -34,6 +36,7 @@ network-create network-delete logrotate + e-smith-manager-update )); templates2events("/etc/e-smith/web/common/foot.tmpl", qw( console-save @@ -41,6 +44,7 @@ network-create network-delete logrotate + e-smith-manager-update )); # conf-httpd-admin @@ -52,6 +56,7 @@ network-delete remoteaccess-update logrotate + e-smith-manager-update )); templates2events("/etc/e-smith/web/common/cgi-bin/AuthTKT.cfg", 'bootstrap-console-save'); @@ -70,24 +75,17 @@ foreach (qw(console-save remoteaccess-update logrotate)) { - safe_symlink("sigusr1", "root/etc/e-smith/events/$_/services2adjust/httpd-admin"); + safe_symlink("reload", "root/etc/e-smith/events/$_/services2adjust/httpd-admin"); } -my %service2order = -( - 'httpd-admin' => "86", -); - -foreach my $service (keys %service2order) -{ - service_link_enhanced($service, $service2order{$service}, 7); -} # Symlink httpd-admin to httpd. safe_symlink("httpd", "root/usr/sbin/httpd-admin"); -# Set up links to daemontools. -safe_symlink("daemontools", "root/etc/rc.d/init.d/httpd-admin"); -service_link_enhanced("httpd-admin", "K15", "6"); -service_link_enhanced("httpd-admin", "K15", "0"); +my $service = "e-smith-manager-update"; + +event_link("systemd-reload", $event, "89"); +event_link("systemd-default", $event, "88"); +safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/httpd-admin"); +templates2events("/etc/e-smith/web/common/cgi-bin/AuthTKT.cfg", $event); diff -Nur e-smith-manager-2.8.0.old/root/etc/e-smith/templates/etc/httpd/admin-conf/httpd.conf/20Manager e-smith-manager-2.8.0/root/etc/e-smith/templates/etc/httpd/admin-conf/httpd.conf/20Manager --- e-smith-manager-2.8.0.old/root/etc/e-smith/templates/etc/httpd/admin-conf/httpd.conf/20Manager 2020-12-10 22:38:26.775000000 -0500 +++ e-smith-manager-2.8.0/root/etc/e-smith/templates/etc/httpd/admin-conf/httpd.conf/20Manager 2020-12-10 22:50:24.172000000 -0500 @@ -51,6 +51,7 @@ unixd authn_core authz_core + systemd )) { next unless -f "/usr/lib/httpd/modules/mod_${_}.so" || diff -Nur e-smith-manager-2.8.0.old/root/usr/lib/systemd/system/httpd-admin.service e-smith-manager-2.8.0/root/usr/lib/systemd/system/httpd-admin.service --- e-smith-manager-2.8.0.old/root/usr/lib/systemd/system/httpd-admin.service 1969-12-31 19:00:00.000000000 -0500 +++ e-smith-manager-2.8.0/root/usr/lib/systemd/system/httpd-admin.service 2020-12-10 22:47:39.130000000 -0500 @@ -0,0 +1,25 @@ +[Unit] +Description=httpd-admin The Koozali SME Server Server-Manager web service +After=network.target remote-fs.target +Documentation=man:httpd(8) +Documentation=man:apachectl(8) + +[Service] +Type=notify +EnvironmentFile=/etc/sysconfig/httpd +ExecStartPre=/sbin/e-smith/service-status httpd-admin +ExecStartPre=/sbin/e-smith/expand-template /etc/httpd/admin-conf/httpd.conf +ExecStart=/usr/sbin/httpd -f /etc/httpd/admin-conf/httpd.conf -DFOREGROUND +ExecReload=/usr/sbin/httpd -f /etc/httpd/admin-conf/httpd.conf -k graceful +ExecStop=/bin/kill -WINCH ${MAINPID} +# We want systemd to give httpd some time to finish gracefully, but still want +# it to kill httpd after TimeoutStopSec if something went wrong during the +# graceful stop. Normally, Systemd sends SIGTERM signal right after the +# ExecStop, which would kill httpd. We are sending useless SIGCONT here to give +# httpd time to finish. +KillSignal=SIGCONT +PrivateTmp=true + +[Install] +WantedBy=sme-server.target +