io.systemd.Shutdown¶
APIs for shutting down or rebooting the system.
| Property | Value |
|---|---|
| Go package | github.com/rossedman/sdvarlink/systemd/latest/shutdown |
| Socket | /run/systemd/io.systemd.Shutdown |
| Available since | systemd v262 |
| Methods · types · errors | 5 · 0 · 2 |
Methods¶
PowerOff¶
Power off the system
Parameters
| Field | Type | Description |
|---|---|---|
allowInteractiveAuthentication |
?bool |
Controls whether interactive authentication (via polkit) shall be allowed. If unspecified defaults to false. |
skipInhibitors |
?bool |
Skip active inhibitors and force the operation |
Reboot¶
Reboot the system
Parameters
| Field | Type | Description |
|---|---|---|
allowInteractiveAuthentication |
?bool |
Controls whether interactive authentication (via polkit) shall be allowed. If unspecified defaults to false. |
skipInhibitors |
?bool |
Skip active inhibitors and force the operation |
Halt¶
Halt the system
Parameters
| Field | Type | Description |
|---|---|---|
allowInteractiveAuthentication |
?bool |
Controls whether interactive authentication (via polkit) shall be allowed. If unspecified defaults to false. |
skipInhibitors |
?bool |
Skip active inhibitors and force the operation |
KExec¶
Reboot the system via kexec
Parameters
| Field | Type | Description |
|---|---|---|
allowInteractiveAuthentication |
?bool |
Controls whether interactive authentication (via polkit) shall be allowed. If unspecified defaults to false. |
skipInhibitors |
?bool |
Skip active inhibitors and force the operation |
SoftReboot¶
Reboot userspace only
Parameters
| Field | Type | Description |
|---|---|---|
allowInteractiveAuthentication |
?bool |
Controls whether interactive authentication (via polkit) shall be allowed. If unspecified defaults to false. |
skipInhibitors |
?bool |
Skip active inhibitors and force the operation |
Errors¶
| Error | Go type | Description |
|---|---|---|
AlreadyInProgress |
AlreadyInProgressError |
Another shutdown or sleep operation is already in progress |
BlockedByInhibitor |
BlockedByInhibitorError |
Operation denied due to active block inhibitor |