Crates.io | service-install |
lib.rs | service-install |
version | 0.4.4 |
source | src |
created_at | 2024-04-07 14:08:54.347626 |
updated_at | 2024-10-15 12:24:40.330916 |
description | Easily provide users an install method on Linux systems |
homepage | |
repository | https://github.com/dvdsk/service-install |
max_upload_size | |
id | 1199186 |
size | 147,378 |
** Easily provide users an install method**
Note this is an early release, there might be bugs
This crate provides the building blocks to build an installer for self contained binaries without runtime dependencies. Such an installer provides less technical users with an easy way to set up your program. It is not a full alternative for integrating with a package manager. For example there is no way to provide updates. Building your own installer is however significantly less work then trying to get your application in all the linux package managers. It is also ideal for tools that are not public.
Installing the current program as a user service named cli that should run at 10:42 every day. This does not need superuser/admin permissions.
use service_install::{install_user, schedule::Schedule};
use time::Time;
fn main() {
let schedule = Schedule::Daily(Time::from_hms(10, 42, 00).unwrap());
let done = install_user!()
.current_exe()
.unwrap()
.name("cli")
.on_schedule(schedule)
.prepare_install()
.unwrap()
.install()
.unwrap();
}
For more detailed examples (such as a working Tui/Prompt) see
Please let me know if there is anything you would like to see! PR's and issues are very welcome!