Stop deploy passing unsupported -dns flag that crash-looped server
DeployTab always appended `-dns <dns1>,<dns2>` to the server ExecStart, but wdtt-server (server.go) defines no -dns flag (DNS is hardcoded to 1.1.1.1). Go's flag parser aborts on unknown flags, so every deploy from the app produced a unit that died with "flag provided but not defined: -dns" / status=2/INVALIDARGUMENT and systemd restart-looped it. Drop -dns from the deploy args so the unit matches what the binary accepts. The DNS fields in the deploy UI are now cosmetic (server uses its built-in 1.1.1.1); honoring them requires adding -dns support to server.go and rebuilding the server asset. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
e3b294bf69
commit
130a5841f5
1 file changed
+4
-2
@@ -584,8 +584,10 @@ private suspend fun performDeploy(
|
||||
val passArg = if (mainPass.isNotBlank()) "-password $mainPass " else ""
|
||||
val adminArg = if (adminId.isNotBlank()) "-admin $adminId " else ""
|
||||
val botArg = if (botToken.isNotBlank()) "-bot-token $botToken " else ""
|
||||
val dnsArg = "-dns ${if(dns1.isNotBlank()) dns1 else "1.1.1.1"}${if(dns2.isNotBlank()) ",$dns2" else ""} "
|
||||
val args = "$passArg$adminArg$botArg$dnsArg".trim()
|
||||
// ВНИМАНИЕ: wdtt-server не поддерживает флаг -dns (DNS захардкожен в server.go),
|
||||
// передача -dns роняла сервис: "flag provided but not defined: -dns" → крах-луп.
|
||||
// Не добавляем -dns в ExecStart, пока сервер не научится его принимать.
|
||||
val args = "$passArg$adminArg$botArg".trim()
|
||||
|
||||
val scriptFile = File(context.cacheDir, "deploy.sh")
|
||||
val serverFile = File(context.cacheDir, "server")
|
||||
|
||||
Reference in new issue
Block a user