mirror of
https://github.com/Microsoft/vscode
synced 2024-08-27 21:09:43 +00:00
cli: fix service failing to install on older systemd (#167672)
Fixes https://github.com/microsoft/vscode/issues/167671 In newer systemd, enablement is apparently implicit with 'link', but it must be called for older setups.
This commit is contained in:
parent
8d585dbf89
commit
a315da7910
|
@ -92,6 +92,19 @@ impl ServiceManager for SystemdService {
|
|||
|
||||
info!(self.log, "Successfully registered service...");
|
||||
|
||||
// note: enablement is implicit in recent systemd version, but required for older systems
|
||||
// https://github.com/microsoft/vscode/issues/167489#issuecomment-1331222826
|
||||
proxy
|
||||
.enable_unit_files(
|
||||
vec![SystemdService::service_name_string()],
|
||||
/* 'runtime only'= */ false,
|
||||
/* replace existing = */ true,
|
||||
)
|
||||
.await
|
||||
.map_err(|e| wrap(e, "error enabling unit files for service"))?;
|
||||
|
||||
info!(self.log, "Successfully enabled unit files...");
|
||||
|
||||
proxy
|
||||
.start_unit(SystemdService::service_name_string(), "replace".to_string())
|
||||
.await
|
||||
|
|
Loading…
Reference in a new issue