I have following service, which run java my java app. There is no ExecStop defined, therefore calling
systemctl stop garage kills the app and app enters into FAILED state. But then, of course, reboot (
FailureAction=reboot) is performed and rpi is rebooted.
I have 2 questions:
1) Is there any change to stop such service over e.g. systemctl without commenting out line "
FailureAction=" and performing
daemon-reload to avoid restart after stopping the service manually?
2) this also brings problem, when
shutdown is called. Systemd stops my service, which enters into failed state, and instead of shutdown, rpi is rebooted, so shutdown operation is "interrupted". Any change to call shutdown without modification as in question 1)?
I was looking for some tip on the Internet, but was not successful.
[Service] Type=notify NotifyAccess=all ExecStart=/usr/java/default/bin/java -Xms150m -Xmx150m \ -Djava.library.path=/home/pi/opencv-3.1.0/build/lib:/usr/local/src/openalpr/src/bindings/java:/home/pi/compile/raspicam-0.1.3/src/jni/:/home/pi/ -jar /home/pi/garageSystem.jar eu /home/pi/alpr.conf /usr/local/src/openalpr/runtime_data/ /home/pi/conf/ Restart=always RestartSec=1 WatchdogSec=60 FailureAction=reboot [Install] WantedBy=multi-user.target