dependabot[bot] aa90e1d531
Bump actions/checkout from 3 to 4 (#14)
Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-26 11:03:28 -03:00
2025-01-15 23:12:45 +01:00
2019-12-17 11:41:04 -03:00
2019-12-17 11:41:04 -03:00
2025-01-15 23:12:45 +01:00
2019-12-17 11:41:04 -03:00
2019-12-17 11:41:04 -03:00
2023-02-16 15:02:56 -03:00

system_shutdown

CI/CD Crates.io Documentation License

system_shutdown provides a cross platform way to shut down, reboot or log out operations.

Supported platforms: Linux, Windows and macOS.

Usage

Add this to your Cargo.toml:

[dependencies]
system_shutdown = "*"

and then:

use system_shutdown::shutdown;

fn main() {
    match shutdown() {
        Ok(_) => println!("Shutting down, bye!"),
        Err(error) => eprintln!("Failed to shut down: {}", error),
    }
}

In most of the systems it does not requires the user to be root/admin.

Contributions

Pull Requests are welcome! =)

License

system_shutdown is licensed under either of the following, at your option:

Description
Rust library to shut down, reboot or log out the system.
Readme 106 KiB
Languages
Rust 100%