Change of plan: no polkit rule. The periodic check runs as a dedicated xinit user, confined by systemd. To restart XWiki it creates a request file in its runtime directory; a systemd path unit then starts a root service that can do two things only: restart the XWiki unit, or ask its JVM for a thread dump. Neither polkit nor sudo is needed.
This message was sent by Atlassian Jira (v9.3.0#930000-sha1:287aeb6)
If image attachments aren't displayed, see this article.