systemd-verifysystemdDeveloperZbigniewJędrzejewski-Szmekzbyszek@in.waw.plsystemd-verify1systemd-verifyCheck unit file validitysystemd-verifyOPTIONSFILESDescriptionsystemd-verify will load unit files and
potentially print warnings if any errors are detected. Files
specified on the command line will be loaded, but also any other
units referenced by them.This command works by prepending the directories for all
command line arguments at the beginning of the unit load path.
This means that all units files found in those directories will
be used in preference to the unit files found in the standard
locations, even if not listed explicitly.The following errors are currently detected:unknown sections and directives,
missing dependencies which are required to start
the given unit,man pages listed in
Documentation= which are not found in the
system,commands listed in ExecStart=
and similar which are not found in the system or not executable.
OptionsThe following options are understood:Do not invoke man to verify the existence
of man pages listen in Documentation=.
Exit statusOn success, 0 is returned, a non-zero failure
code otherwise.ExamplesMisspelt directives$ cat ./user.slice
[Unit]
WhatIsThis=11
Documentation=man:systemd.nosuchfile(7)
Requires=different.service
[Service]
Desription=x
$ systemd-verify ./user.slice
[./user.slice:9] Unknown lvalue 'WhatIsThis' in section 'Unit'
[./user.slice:13] Unknown section 'Service'. Ignoring.
Error: org.freedesktop.systemd1.LoadFailed: Unit different.service failed to load: No such file or directory.
Failed to create user.slice/start: Invalid argument
user.slice: man systemd.nosuchfile(7) command failed with code 16
Missing service units$ tail ./a.socket ./b.socket
==> ./a.socket <==
[Socket]
ListenStream=100
==> ./b.socket <==
[Socket]
ListenStream=100
Accept=yes
$ systemd-verify ./a.socket ./b.socket
Service a.service not loaded, a.socket cannot be started.
Service b@0.service not loaded, b.socket cannot be started.
See Alsosystemd8,
systemctl1,
systemd.unit5,
systemd.directives7