fix: always show install-service option regardless of current state
This commit is contained in:
+3
-5
@@ -801,11 +801,9 @@ function Main-Menu {
|
||||
$hasService = $hubExists -or $runnerExists
|
||||
$autostartEnabled = ($hubExists -and "$($script:STATUS_AUTOSTART_HUB)" -ne "Disabled") -or ($runnerExists -and "$($script:STATUS_AUTOSTART_RUNNER)" -ne "Disabled")
|
||||
|
||||
if (-not $hasService) {
|
||||
Write-Host " $i) 安装计划任务 (hub + runner)"
|
||||
$options += "setup_autostart"
|
||||
$i++
|
||||
}
|
||||
Write-Host " $i) 安装计划任务 (hub + runner)"
|
||||
$options += "setup_autostart"
|
||||
$i++
|
||||
|
||||
if ($autostartEnabled) {
|
||||
Write-Host " $i) 禁用开机自启"
|
||||
|
||||
+3
-5
@@ -1168,11 +1168,9 @@ main_menu() {
|
||||
local autostart_enabled=false
|
||||
[[ "$STATUS_AUTOSTART_HUB_ENABLED" == "enabled" || "$STATUS_AUTOSTART_RUNNER_ENABLED" == "enabled" ]] && autostart_enabled=true
|
||||
|
||||
if [[ "$has_service" == false ]]; then
|
||||
echo " $i) 安装系统服务 (hub + runner)"
|
||||
options+=("setup_autostart")
|
||||
((i++))
|
||||
fi
|
||||
echo " $i) 安装系统服务 (hub + runner)"
|
||||
options+=("setup_autostart")
|
||||
((i++))
|
||||
|
||||
if [[ "$autostart_enabled" == true ]]; then
|
||||
echo " $i) 禁用开机自启"
|
||||
|
||||
Reference in New Issue
Block a user