Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Automatic Start up using reg key RUN
17-10-2016, 17:23
Post: #11
RE: Automatic Start up using reg key RUN
Thanks for the clarifications. You are correct that these launch options are not a documented API and could therefore change in a future version.

As you don't (I think) actually want to use console commands, I will add a new launch option to run MinimServer with no console and no tray icon. I will post back here with details when I have this working.

Thanks for developing and sharing a well-engineered solution for this requirement.
Find all posts by this user
Quote this message in a reply
18-10-2016, 11:52
Post: #12
RE: Automatic Start up using reg key RUN
(17-10-2016 17:23)simoncn Wrote:  Thanks for the clarifications. You are correct that these launch options are not a documented API and could therefore change in a future version.

As you don't (I think) actually want to use console commands, I will add a new launch option to run MinimServer with no console and no tray icon. I will post back here with details when I have this working.

Thanks for developing and sharing a well-engineered solution for this requirement.
In fact, I am using the console. The configuration connects files to the standard and error outputs to log messages (although I haven't paid any attention to the contents of those files, but will have a look next time I have the chance). I also have the NSSM configuration set to stop MinimServer by sending Ctrl-C to the console.

One of the issues with running as a service, a program not intended to be run as a service is shutting the program down politely. NSSM has various options for this, see: https://nssm.cc/usage (under the Service Shutdown section). Because it was trivially easy to test, I simply checked that the first option of sending Ctrl-C worked.

If a program is designed to run as a service, then it should respond appropriately (at least) to SERVICE_CONTROL_STOP and SERVICE_CONTROL_SHUTDOWN messages. That's why you need an intermediate program (NSSM) to accept and act on these messages. The alternative of using something like WinRun4J in service mode requires that the Java program handles these. e.g. see: https://borisinc.wordpress.com/2009/05/3...-winrun4j/

So, to have a way of running MinimServer as a service ideally requires two features: a method of shutting down politely that NSSM can use, and a way of saving the logging information.

I assume that most users of MinimServer will either use a supported NAS, or a GNU/linux server. And, a number of users of the windows implementation will be using it only for test purposes (as DavidHB has reported) or for evaluation. In those case the service requirement seems less important. I did the work on running as a service because I happen to have a nettop windows PC (Acer Revo One) which is reasonably low powered and has a 2TB hard disk, and I wanted to satisfy myself that I could produce a generalisable solution to do this in a safe way.

However, if there's a supported configuration for running MinimServer in this way, I'll happily update the instructions. Although the absence of comment on those instructions suggests that there isn't much interest, which is what I expect.
Find all posts by this user
Quote this message in a reply
18-10-2016, 12:55
Post: #13
RE: Automatic Start up using reg key RUN
The new option will not cause any problems with logging or Ctrl-C. It will be available in the next update and the syntax will be --set watch.view=log. With this option, there is no need to use --noprompt.

With 'log' view, logging messages are written to stderr in the same way as with 'console' view. MinimServer still reads from stdin but the prompt is changed from:

Enter command (? for help):

to:

Startup complete - press enter to shutdown:

MinimServer has always supported 'log' view as a fallback for when no graphical desktop is available but until now there hasn't been a launch option to select it explicitly.

There have been quite a few posts from users about running MinimServer as a service on Windows and I think a number of people will want to make use of the approach you have described.

Would you like to create a new Tutorial thread in the Digital Audio section of the forum containing instructions for this? This makes the instructions readily visible rather than being buried elsewhere. The thread title should start with [Tutorial].
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)