We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 002b6ec commit 2a5ca4bCopy full SHA for 2a5ca4b
src/openrc.rs
@@ -83,11 +83,15 @@ impl ServiceManager for OpenRcServiceManager {
83
}
84
85
fn uninstall(&self, ctx: ServiceUninstallCtx) -> io::Result<()> {
86
- rc_update(
+ // If the script is configured to run at boot, remove it
87
+ let _ = rc_update(
88
"del",
89
&ctx.label.to_script_name(),
90
[OsStr::new("default")],
- )
91
+ );
92
+
93
+ // Uninstall service by removing the script
94
+ std::fs::remove_file(service_dir_path().join(&ctx.label.to_script_name()))
95
96
97
fn start(&self, ctx: ServiceStartCtx) -> io::Result<()> {
0 commit comments