From: Niki Roo Date: Fri, 3 Apr 2020 18:18:46 +0000 (+0200) Subject: allow --remote on --stop-server X-Git-Tag: fanfix-swing-0.0.1~12^2~6^2~9 X-Git-Url: https://git.nikiroo.be/?a=commitdiff_plain;h=aad0e5ae672189ac745a10d65e2d2d3d2b52899d;p=fanfix-swing.git allow --remote on --stop-server --- diff --git a/src/be/nikiroo/fanfix/Main.java b/src/be/nikiroo/fanfix/Main.java index 2ed276b1..6f77e443 100644 --- a/src/be/nikiroo/fanfix/Main.java +++ b/src/be/nikiroo/fanfix/Main.java @@ -597,10 +597,14 @@ public class Main { } return; case STOP_SERVER: - key = Instance.getConfig().getString(Config.SERVER_KEY); - port = Instance.getConfig().getInteger(Config.SERVER_PORT); + // Can be given via "--remote XX XX XX" + if (key == null) + key = Instance.getConfig().getString(Config.SERVER_KEY); + if (port == null) + port = Instance.getConfig().getInteger(Config.SERVER_PORT); + if (port == null) { - System.err.println("No port configured in the config file"); + System.err.println("No port given nor configured in the config file"); exitCode = 15; break; }