Hi,
I did some research and seems that to use a system property in order
to set the exit code is the approach teams are using so far. Equinox
is using something like that also.
systemd support read the exit code from a system property and then
it will exit or restart the service depending on its value.
regards,
Cristiano
On 28/01/2016 03:50, Jan Rellermeyer
wrote:
I
think this is a good point. Maybe we should be adding a
property to Concierge (or the shell but I would guess it
would be more general to handle this in the framework as
other management interfaces would also benefit from it) that
makes it easier to embed into a systemd environment.
I
will try and code something up as soon as I have a few spare
cycles.
--Jan.
Hi Jochen
and Tim,
systemd is a great piece of software, very powerful and
flexible. It can handle JVM and other kind of crash nicely
if well configured.
you can even set the service to be restarted in case of any
failure... see
Restart= in
[1]
but the problem (I think) is the osgi console quit and exit
do not return any error exit code or signal that could be
tracked by it (at least I think it returns 0, but have not
sure).
we can set systemd to also restart always, but this probably
will make it restart even if I stop de service manually.
[1] - http://0pointer.de/public/systemd-man/systemd.service.html
regards,
Cristiano
On 27-01-2016 05:54, Tim Verbelen
wrote:
Hi Cristiano,
Besides a user stopping the framework from the console,
there is also the possibility of an unexpected error in
the JVM that crashes the process.
Maybe another option to achieve what you want would be to
monitor the Java process and automatically restart it when
it was stopped outside of the systemd service (i.e.
terminal exit or crash).
You can also use the existing storage directory to restart
the framework then in exactly its previous state.
Best regards,
Tim
On 01/27/2016 03:02 AM, Cristiano Gavião wrote:
Hi again,
I'm setting the container to be started as linux systemd
service and detach the console using linux screen.
when necessary I would like to stop/restart the container
using only the systemd service commands (through kill TERM
signal). Then I'm thinking in restrict the ways to
exit/quit from console.
is there anything I can do to achieve that ?
thanks,
Cristiano
_______________________________________________
concierge-dev mailing list
concierge-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password,
or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/concierge-dev
_______________________________________________
concierge-dev mailing list
concierge-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/concierge-dev
|