I run the following command :
systemctl status tomcat10.service
#and get the following warning:
Warning: The unit file, source configuration file or drop-ins of tomcat10.service changed on disk. Run 'systemctl daemon-reload' to reload units.
If I look at the unit file
ls -l /usr/lib/systemd/system/tomcat10.service
-rw-r--r-- 1 root root 1161 Jul 2 12:36 /usr/lib/systemd/system/tomcat10.service
The file has been modified or at least tempered with.
However even if I compare the current running config using some contraption like this:
systemctl cat tomcat10.service | diff /usr/lib/systemd/system/tomcat10.service -
# Warning: tomcat10.service changed on disk, the version systemd has loaded is
outdated.
# This output shows the current version of the unit's original fragment and drop-in files.
# If fragments or drop-ins were added or removed, they are not properly reflected in this output.
# Run 'systemctl daemon-reload' to reload units.
0a1
> # /usr/lib/systemd/system/tomcat10.service
But in this case I cannot see anything different at all and the message confuses me, am I really comparing running congig with current config ? and if I am nothing as change so why systemd is asking me for a daemon-reload ?
So my question is how can I reliably compare systemctl unit running config with current startup config?
And more broadly, how to know what has change when doing or is about to change when/before typing systemctl daemon-reload
.