Description: Use the init-system agnostic "service" command for the webadmin
 restart commands.
From: Soren Stoutner <soren@debian.org>
Forwarded: not-needed
Last-Update: 2025-08-25
Comment: Discussed at
 https://github.com/svarshavchik/courier/issues/63#issuecomment-3221586246

--- a/webadmin/Makefile.am
+++ b/webadmin/Makefile.am
@@ -38,7 +38,8 @@ install-data-hook:
 	chmod 755 $(DESTDIR)$(webadmindir)
 	-$(mkinstalldirs) $(DESTDIR)$(sysconfdir)/webadmin
 	chmod 700 $(DESTDIR)$(sysconfdir)/webadmin
-	echo '$(authdaemond) restart' >>$(DESTDIR)$(sysconfdir)/webadmin/restartauthcmd
+	echo 'service courier restart &' >>$(DESTDIR)$(sysconfdir)/webadmin/restartcmd
+	echo 'service courier-authdaemon restart' >>$(DESTDIR)$(sysconfdir)/webadmin/restartauthcmd
 	-chown @mailuser@ $(DESTDIR)$(sysconfdir)/webadmin/restartcmd
 	-chgrp @mailgroup@ $(DESTDIR)$(sysconfdir)/webadmin/restartcmd
 
