Re: systemd tomcat script for Linux EL7

2016-03-19 Thread Lyallex
Do you have the answer to my question? CentOS Linux release 7.2.1511 I think it actually boils down to 'how do you start start Tomcat as a daemon (using jsvc) on a privileged port (<1024) switching to a no login user (tomcat) on a system that uses a systemd init process. The rant you refer to do

Re: systemd tomcat script for Linux EL7

2016-03-19 Thread Me Self
Hi I use this Systemd unit file (from https://sorenpoulsen.com/install-tomcat-8-on-ubuntu) on ubuntu, but it's probably fairly generic as the unit file just calls tomcats start and stop scripts directly. [Unit] Description=Apache Tomcat After=syslog.target network.target [Service] Type=forking

Re: systemd tomcat script for Linux EL7

2016-03-19 Thread jieryn
Meh. It's short and sweet and working systemd unit file. [Unit] Description=Apache Tomcat Web Application Container [Service] User=tomcat Group=tomcat ExecStart=/usr/share/tomcat/bin/catalina.sh run [Install] WantedBy=multi-user.target On Wed, Mar 16, 2016 at 8:57 PM, Christopher Schultz wrote:

Re: systemd tomcat script for Linux EL7

2016-03-19 Thread Lyallex
Apologies for dredging this up but I'm having some problems with this. Any ideas much appreciated. Ii have been forced to move from a version of centOS the used the old /etc/rc.d/init.d way of doing things to a new version of CentOS that uses systemd. The hosts can't or won't help because I'm usin

Re: systemd tomcat script for Linux EL7

2016-03-19 Thread jieryn
ExecStartPre=/usr/sbin/setcap 'cap_net_bind_service=+ep' /usr/share/tomcat/bin/catalina.sh I see a lot of advice for start/stop instead of run within systemd unit files, both here and in the wild. The gem in the rant I linked is about start vs run. Sorry if you didn't see it. On Thu, Mar 17, 2016

Re: systemd tomcat script for Linux EL7

2016-03-19 Thread Lyallex
But that doesn't work for ports < 1024 On 17 March 2016 at 01:47, jieryn wrote: > Meh. It's short and sweet and working systemd unit file. > > [Unit] > Description=Apache Tomcat Web Application Container > [Service] > User=tomcat > Group=tomcat > ExecStart=/usr/share/tomcat/bin/catalina.sh run >

Re: systemd tomcat script for Linux EL7

2016-03-19 Thread jieryn
http://homepage.ntlworld.com/jonathan.deboynepollard/FGA/systemd-house-of-horror/tomcat.html On Wed, Mar 16, 2016 at 1:01 PM, Lyallex wrote: > Apologies for dredging this up but I'm having some problems with this. > Any ideas much appreciated. > > Ii have been forced to move from a version of cen

Re: systemd tomcat script for Linux EL7

2016-03-18 Thread Lyallex
Firstly apologies to anyone I have sent an unsolicited reply to personally, Stupid, tired, It won't happen again Thanks to all for the responses so far The problem with using the startup and shutdown scripts is that the process ends up running as root. As any server admin worth his salt will tell

Re: systemd tomcat script for Linux EL7

2016-03-18 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 jieryn, On 3/16/16 1:36 PM, jieryn wrote: > http://homepage.ntlworld.com/jonathan.deboynepollard/FGA/systemd-house - -of-horror/tomcat.html Wow, > lots of ranting about environment variables and little-used PID files. If the author only understood

Re: systemd tomcat script for Linux EL7

2015-06-05 Thread Ray Holme
That looks OK, but I would suggest the following. Put all the real stuff in a standard bash script with 3 parameters   start, stop, restart- pretty much like the OLD system 5 way fo doing things.This has the advantage of allowing you to add other things you might want to add AND executing the sc

systemd tomcat script for Linux EL7

2015-06-04 Thread Dale Ogilvie
Hi all, I am trying to put together a systemd script for an install of the current binary release tomcat7. Follows my current best effort, cobbled together from the (RH)EL7 packaged version and some googling... I am trying to use the unadulterated tomcat up/down scripts from the binary release.