forked from lix-project/lix-installer
Only symlink if the link doesn't already exist in configure_init_service.rs (#317)
This commit is contained in:
parent
07a48fe3bd
commit
385283173b
|
@ -210,6 +210,7 @@ impl Action for ConfigureInitService {
|
|||
// cli, interactively ask for permission to remove the file
|
||||
|
||||
Self::check_if_systemd_unit_exists(SERVICE_SRC, SERVICE_DEST).await?;
|
||||
if !Path::new(SERVICE_DEST).exists() {
|
||||
tokio::fs::symlink(SERVICE_SRC, SERVICE_DEST)
|
||||
.await
|
||||
.map_err(|e| {
|
||||
|
@ -219,8 +220,10 @@ impl Action for ConfigureInitService {
|
|||
e,
|
||||
)
|
||||
})?;
|
||||
}
|
||||
|
||||
Self::check_if_systemd_unit_exists(SOCKET_SRC, SOCKET_DEST).await?;
|
||||
if !Path::new(SOCKET_DEST).exists() {
|
||||
tokio::fs::symlink(SOCKET_SRC, SOCKET_DEST)
|
||||
.await
|
||||
.map_err(|e| {
|
||||
|
@ -230,6 +233,7 @@ impl Action for ConfigureInitService {
|
|||
e,
|
||||
)
|
||||
})?;
|
||||
}
|
||||
|
||||
if *start_daemon {
|
||||
execute_command(
|
||||
|
|
Loading…
Reference in a new issue