Return error message when start-up fails with systemd unit file for playframework -


i have systemd unit file start play app:

# systemd unit file playapp [unit] description=run server playapp wants=syslog.target network.target after=network.target  [service] type=simple pidfile=/opt/playapp/play.pid  execstart=/opt/playapp/bin/playapp execstop=/bin/kill $mainpid restart=always successexitstatus=143  [install] wantedby=multi-user.target 
  • with type=simple there no feedback if start-up systemctl start playapp.service fails.
  • with type=forking there error if start-up fails, systemctl start playapp.service stays in foreground of shell, if there no error in start-up.

what best way start play application systemd? (with error message if start-up isn't successful)

there no easy way : service starts java number of arguments. if things fail (usually during di initialisation), service terminates. service (read : startup of java) successful : terminates during startup.

systemd notices that, , restarts if required. error however, directed play logfiles, systemd has no notice off. accepted fact, , tail if needed (actually, redirect logging central systlog server, that's implementation detail).


Comments

Popular posts from this blog

angular - Ionic slides - dynamically add slides before and after -

minify - Minimizing css files -

Add a dynamic header in angular 2 http provider -