* fixup! feat: Service Mode for Linux (#804)
* fixup! feat: Service Mode for Linux (#804)
* Partially revert "fixup! feat: Service Mode for Linux (#804)"
This reverts commit e6a5a2b496.
This commit is contained in:
committed by
GitHub
Unverified
parent
1c583d2ea9
commit
d90fb6fc9b
@@ -185,22 +185,14 @@ pub async fn patch_verge(patch: IVerge) -> Result<()> {
|
||||
let tun_tray_icon = patch.tun_tray_icon;
|
||||
|
||||
match {
|
||||
#[cfg(any(target_os = "windows", target_os = "linux"))]
|
||||
{
|
||||
let service_mode = patch.enable_service_mode;
|
||||
let service_mode = patch.enable_service_mode;
|
||||
|
||||
if service_mode.is_some() {
|
||||
log::debug!(target: "app", "change service mode to {}", service_mode.unwrap());
|
||||
if service_mode.is_some() {
|
||||
log::debug!(target: "app", "change service mode to {}", service_mode.unwrap());
|
||||
|
||||
Config::generate()?;
|
||||
CoreManager::global().run_core().await?;
|
||||
} else if tun_mode.is_some() {
|
||||
update_core_config().await?;
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(not(target_os = "windows"))]
|
||||
if tun_mode.is_some() {
|
||||
Config::generate()?;
|
||||
CoreManager::global().run_core().await?;
|
||||
} else if tun_mode.is_some() {
|
||||
update_core_config().await?;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user