I have Jenkins running on a CentOS7 and it kind of crashes from time to time and I'd like to restart it automatically when this happens. Googleing a bit I've found that on Systemd you can use Restart=on-failure but the problem is that from what I see Jenkins does not use a service file.
If I do systemctl status jenkins.service I get:
● jenkins.service - LSB: Jenkins Continuous Integration Server
Loaded: loaded (/etc/rc.d/init.d/jenkins)
Active: active (running) since Mon 2016-02-29 17:30:08 UTC; 11min ago
So looks like it's still using init.d? Any idea how I can use this Restart=on-failure
in this case?