mirror of
https://github.com/PAMGuard/PAMGuard.git
synced 2024-11-25 08:32:32 +00:00
Add exitnosave command
Add command for UDP or terminal control which will exit PAMGuard without first saving the settings
This commit is contained in:
parent
f4f7cc59b6
commit
e4faed5cfc
@ -36,7 +36,7 @@ public class PamguardVersionInfo {
|
||||
/**
|
||||
* Release date
|
||||
*/
|
||||
static public final String date = "29 September 2022";
|
||||
static public final String date = "3 October 2022";
|
||||
|
||||
// /**
|
||||
// * Release type - Beta or Core
|
||||
|
@ -35,6 +35,7 @@ public abstract class CommandManager extends PamControlledUnit {
|
||||
commandsList.add(new SummaryPeekCommand());
|
||||
commandsList.add(new TellModuleCommand());
|
||||
commandsList.add(new ExitCommand());
|
||||
commandsList.add(new ExitNoSaveCommand());
|
||||
commandsList.add(new KillCommand());
|
||||
commandsList.add(new HelpCommand(this));
|
||||
commandsList.add(new GetXMLSettings());
|
||||
|
@ -24,7 +24,7 @@ public class ExitCommand extends ExtCommand {
|
||||
|
||||
@Override
|
||||
public String getHint() {
|
||||
return "Exit PAMGuard, stopping detectors prior to exiting";
|
||||
return "Exit PAMGuard, stopping detectors and saving configuration prior to exiting";
|
||||
}
|
||||
|
||||
|
||||
|
24
src/PamController/command/ExitNoSaveCommand.java
Normal file
24
src/PamController/command/ExitNoSaveCommand.java
Normal file
@ -0,0 +1,24 @@
|
||||
package PamController.command;
|
||||
|
||||
import PamController.PamController;
|
||||
|
||||
public class ExitNoSaveCommand extends ExtCommand {
|
||||
|
||||
public ExitNoSaveCommand() {
|
||||
super("ExitNoSave", false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String execute(String command) {
|
||||
PamController.getInstance().pamStop();
|
||||
System.exit(0);
|
||||
return getName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getHint() {
|
||||
return "Exit PAMGuard, stopping detectors but not saving configuration";
|
||||
}
|
||||
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user