[Windows] Fix '---background' parameter
Gitea/Java-Installer/pipeline/head This commit looks good
Details
Gitea/Java-Installer/pipeline/head This commit looks good
Details
parent
48528d3cb2
commit
6e25ffd730
|
@ -319,12 +319,12 @@ public class InstallConfig {
|
||||||
* @param serviceUser the user for the service
|
* @param serviceUser the user for the service
|
||||||
* @param serviceGroup the group for the service
|
* @param serviceGroup the group for the service
|
||||||
* @param serviceEnvironment the environment variables to set
|
* @param serviceEnvironment the environment variables to set
|
||||||
* @param serviceExecStartPre the commands to execute before the service starts. Use -{@literal <}LaunchScript-{@literal >} to replace it with the real location of the launch script
|
* @param serviceExecStartPre the commands to execute before the service starts. Use {@literal <}LaunchScript{@literal >} to replace it with the real location of the launch script
|
||||||
* @param serviceExecStartPost the commands to execute after the service has started. Use-{@literal <}LaunchScript-{@literal >} to replace the location of the launch script
|
* @param serviceExecStartPost the commands to execute after the service has started. Use {@literal <}LaunchScript{@literal >} to replace the location of the launch script
|
||||||
* @param serviceTimeout the number of seconds which should been allowed to start / stop the service
|
* @param serviceTimeout the number of seconds which should been allowed to start / stop the service
|
||||||
* @param serviceType the type of the service -{@literal >} oneshot, simple, exec and forking
|
* @param serviceType the type of the service {@literal >} oneshot, simple, exec and forking
|
||||||
* @param serviceExecStart the start command. Please take in mind that only with the type "oneshot" multiple commands can be specified.
|
* @param serviceExecStart the start command. Please take in mind that only with the type "oneshot" multiple commands can be specified.
|
||||||
* Use -{@literal <}LaunchScript-{@literal >} to replace it with the real location of the launch script
|
* Use {@literal <}LaunchScript{@literal >} to replace it with the real location of the launch script
|
||||||
* @param serviceExecStop the stop command. Use #LaunchScript# to replace the location of the launch script
|
* @param serviceExecStop the stop command. Use #LaunchScript# to replace the location of the launch script
|
||||||
* @param serviceRestart whether the service should been restarted when the execution failed -{@literal >} on-failure or always
|
* @param serviceRestart whether the service should been restarted when the execution failed -{@literal >} on-failure or always
|
||||||
* @param serviceRestartSec the number of seconds to wait between a restart
|
* @param serviceRestartSec the number of seconds to wait between a restart
|
||||||
|
|
|
@ -746,8 +746,9 @@ public class Installer {
|
||||||
+ "\n"
|
+ "\n"
|
||||||
+ ":: main programm logic\n"
|
+ ":: main programm logic\n"
|
||||||
+ "SET exitScript=0\n"
|
+ "SET exitScript=0\n"
|
||||||
+ "IF defined programOption if %foreground% == \"falseDefault\" SET foreground=\"true\"\n"
|
+ "IF defined programOption IF %foreground% == \"falseDefault\" SET foreground=\"true\"\n"
|
||||||
+ "IF %foreground% == \"trueDefault\" SET foreground=\"true\"\n"
|
+ "IF %foreground% == \"trueDefault\" SET foreground=\"true\"\n"
|
||||||
|
+ "IF defined background IF %background% == \"true\" SET foreground=\"false\"\n"
|
||||||
+ "\n"
|
+ "\n"
|
||||||
+ "IF %stop% == \"true\" (\n"
|
+ "IF %stop% == \"true\" (\n"
|
||||||
+ " wmic PROCESS Where \"name Like '%%java%%' AND CommandLine like '%%" + conf.getApplicationNameShort() + "%%'\" Call Terminate\n"
|
+ " wmic PROCESS Where \"name Like '%%java%%' AND CommandLine like '%%" + conf.getApplicationNameShort() + "%%'\" Call Terminate\n"
|
||||||
|
|
Loading…
Reference in New Issue