systemd-ac-power - Man Page

Report whether we are connected to an external power source

Synopsis

systemd-ac-power [Options...]

Description

systemd-ac-power may be used to check whether the system is running on AC power or not. By default it will simply return success (if we can detect that we are running on AC power) or failure, with no output. This can be useful for example to debug ConditionACPower= (see systemd.unit(5)).

Options

The following options are understood:

-v, ā€‰--verbose

Show result as text instead of just returning success or failure.

-h, ā€‰--help

Print a short help text and exit.

--version

Print a short version string and exit.

Exit Status

On success (running on AC power), 0 is returned, a non-zero failure code otherwise.

See Also

systemd(1)

Referenced By

systemd.directives(7), systemd.index(7).

systemd 253