blob: 863afbf7c5f8c8eebf44c27d34b5e78742b68e7b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
|
'\" t
.TH "SYSTEMD\-AC\-POWER" "1" "" "systemd 256~rc3" "systemd-ac-power"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
systemd-ac-power \- Report whether we are connected to an external power source
.SH "SYNOPSIS"
.HP \w'\fBsystemd\-ac\-power\fR\ 'u
\fBsystemd\-ac\-power\fR [OPTIONS...]
.SH "DESCRIPTION"
.PP
\fBsystemd\-ac\-power\fR
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
\fIConditionACPower=\fR
(see
\fBsystemd.unit\fR(5))\&.
.SH "OPTIONS"
.PP
The following options are understood:
.PP
\fB\-v\fR, \fB\-\-verbose\fR
.RS 4
Show result as text instead of just returning success or failure\&.
.sp
Added in version 253\&.
.RE
.PP
\fB\-\-low\fR
.RS 4
Instead of showing AC power state, show low battery state\&. In this case will return zero if all batteries are currently discharging and below 5% of maximum charge\&. Returns non\-zero otherwise\&.
.sp
Added in version 254\&.
.RE
.PP
\fB\-h\fR, \fB\-\-help\fR
.RS 4
Print a short help text and exit\&.
.RE
.PP
\fB\-\-version\fR
.RS 4
Print a short version string and exit\&.
.RE
.SH "EXIT STATUS"
.PP
On success (running on AC power), 0 is returned, a non\-zero failure code otherwise\&.
.SH "SEE ALSO"
.PP
\fBsystemd\fR(1)
|