You are not logged in.
Pages: 1
ServiceStateText in mORMot2 has error, it was copied from mORMot1 when enum state as text was converted so it removed first two chars (ssStopped-> Stopped)
In ver2 there's an SERVICESTATE const array so there's no need for conversion, it should simply be:
Result := _SERVICESTATE[State];
BTW, TSynDaemon reacts only based on command line arguments, I think it would be an improvement to allow switches (/start/install...) to be called manually. For example I want to control how application starts (as a service, console, or GUI) from ini/json settings, not from a command line.
Offline
You are right.
I have remoted ServiceStateText() in favor of plain ToText().
https://github.com/synopse/mORMot2/commit/fedb84b9
For your purpose, I have added a new TSynDaemon.Command alternate execution method.
But note that it is of little use, because the daemon is executed in the context of the daemon service, not a third-party application.
https://github.com/synopse/mORMot2/commit/eed1cc75
Online
Thanks, it works perfectly for what I need. I have three types of working modes in same app, as a service, gui or console. Gui mode could be a standalonea app or configurator/installer/monitor for service mode.
Offline
Pages: 1