Everytime I run apt upgrade
and there is an actual upgrade, a service that I have created gets restarted.
Typically, I get this message
┌────┤ Daemons using outdated libraries ├─────┐
│ │
│ │
│ Which services should be restarted? │
│ │
│ [ ] unattended-upgrades.service │
│ [*] wildfly.service │
│ │
│ │
│ <Ok> <Cancel>
This seems to be related to needrestart, see output below:
$sudo needrestart -u NeedRestart::UI::stdio -r l
Scanning processes...
Scanning candidates...
Scanning linux images...
Running kernel seems to be up-to-date.
Services to be restarted:
systemctl restart wildfly.service
This is the service configuration:
[Unit]
Description=WildFly Application Server
Wants=network-online.target
After=network-online.target
[Service]
Type=simple
User=wildfly
Group=wildfly
StandardOutput=null
ExecStart=/opt/wildfly/wildfly-26.1.1.Final/bin/standalone.sh
ExecReload=/opt/wildfly/wildfly-26.1.1.Final/bin/jboss-cli.sh --connect --commands="reload"
ExecStop=/opt/wildfly/wildfly-26.1.1.Final/bin/jboss-cli.sh --connect --commands="shutdown"
[Install]
WantedBy=multi-user.target
What do I need to change so that the service does not get restarted unnecessarily in the future?