X-Git-Url: http://git.iain.cx/?a=blobdiff_plain;ds=sidebyside;f=README.txt;h=12a83939ffef5e3b20e0abcf42da875576b54ae2;hb=3e92dce8716991c7100ea55f0b5e202a05c1b56d;hp=a731a46bb465cb2a8b826579bf24092d4ee9d44e;hpb=1f0b03b38f7d76814d1c7c627f64462362100223;p=nssm.git diff --git a/README.txt b/README.txt index a731a46..12a8393 100644 --- a/README.txt +++ b/README.txt @@ -574,6 +574,12 @@ If the application crashes and is restarted by NSSM, the order might be: Exit/Post +If NSSM is redirecting stdout or stderr it can be configured to redirect +the output of any hooks it runs. Set AppRedirectHooks to 1 to enable +that functionality. A hook can of course redirect its own I/O independently +of NSSM. + + Managing services using the GUI ------------------------------- NSSM can edit the settings of existing services with the same GUI that is @@ -632,9 +638,10 @@ would have the same effect. Non-standard parameters ----------------------- -The AppEnvironment and AppEnvironmentExtra parameters recognise an -additional argument when querying the environment. The following syntax -will print all extra environment variables configured for a service +The AppEnvironment, AppEnvironmentExtra and Environment parameters +recognise an additional argument when querying the environment. The +following syntax will print all extra environment variables configured +for a service nssm get AppEnvironmentExtra @@ -649,6 +656,39 @@ KEY=VALUE pair in separate command line arguments. For example: nssm set AppEnvironment CLASSPATH=C:\Classes TEMP=C:\Temp +Alternatively the KEY can be prefixed with a + or - symbol to respectively +add or remove a pair from the block. + +The following two lines set CLASSPATH and TEMP: + + nssm set AppEnvironment CLASSPATH=C:\Classes + nssm set AppEnvironment +TEMP=C:\Temp + +If the key is already present, specifying +KEY will override the value +while preserving the order of keys: + + nssm set AppEnvironment +CLASSPATH=C:\NewClasses + +The following syntax removes a single variable from the block while +leaving any other variables in place. + + nssm set AppEnvironment -TEMP + +Specifying -KEY=VALUE will remove the variable only if the existing +value matches. + +The following syntax would not remove TEMP=C:\Temp + + nssm set AppEnvironment -TEMP=C:\Work\Temporary + +The + and - symbols are valid characters in environment variables. +The syntax :KEY=VALUE is equivalent to KEY=VALUE and can be used to +set variables which start with +/- or to explicitly reset the block in +a script: + + nssm set AppEnvironment :CLASSPATH=C:\Classes + nssm set AppEnvironment +TEMP=C:\Temp + The AppExit parameter requires an additional argument specifying the exit code to get or set. The default action can be specified with the string @@ -891,6 +931,8 @@ Thanks to Scott Ware for reporting a crash saving the environment on XP 32-bit. Thanks to Stefan and Michael Scherer for reporting a bug writing the event messages source. Thanks to Paul Baxter for help with Visual Studio 2015. Thanks to Mathias Breiner for help with Visual Studio and some registry fixes. +Thanks to David Bremner for general tidyups. +Thanks to Nabil Redmann for suggesting redirecting hooks' output. Licence -------