[CentOS] Help with systemd

2015-09-23 Thread Clint Dilks
Hi I am trying to get Greenstone3 http://www.greenstone.org/download to work with systemd. So far I have come up with the following which works but feels more like a hack than a solution. Does anyone have any suggestions on how to do this better ? # cat /etc/tmpfiles.d/greenstone3.conf d

Re: [CentOS] Help with systemd

2015-09-23 Thread Jonathan Billings
On Thu, Sep 24, 2015 at 09:36:59AM +1200, Clint Dilks wrote: > # cat /etc/systemd/system/greenstone3.service > # Systemd unit file for Greenstone 3 > [Unit] > Description=Greenstone 3 Server > After=syslog.target network.target > > [Service] > Type=forking >

Re: [CentOS] Help with systemd

2015-09-23 Thread John R Pierce
On 9/23/2015 2:58 PM, Jonathan Billings wrote: 1.) why 'cd /greenstone/gs3 && ant start' when you could just run '/greenstone/gs3/ant start'. thats *not* equivalent, unless ant is in /greenstone/gs3 *and* . is in the path, and even then, ant looks for build.xml in the current path when its

Re: [CentOS] Help with systemd

2015-09-23 Thread Clint Dilks
Hi Jonathan, Thanks for the feedback 2.) You're going through a lot of effort to generate a pidfile, when > it's completely unnecesary for systemd services. > > I tried not using a pidfile initially and this that case things would start up and run correctly for a short period but then systemd

Re: [CentOS] Help with systemd

2015-09-23 Thread Dennis Jacobfeuerborn
On 24.09.2015 00:06, John R Pierce wrote: > On 9/23/2015 2:58 PM, Jonathan Billings wrote: >> 1.) why 'cd /greenstone/gs3 && ant start' when you could just run >> '/greenstone/gs3/ant start'. > > thats *not* equivalent, unless ant is in /greenstone/gs3 *and* . is in > the path, and even then,

Re: [CentOS] Help with systemd

2015-09-23 Thread Jonathan Billings
On Sep 23, 2015, at 6:25 PM, Clint Dilks wrote: > Takes a boolean value that specifies whether systemd should try to guess > the main PID of a service if it cannot be determined reliably. This option > is ignored unless Type=forking is set and PIDFile= is unset because for

Re: [CentOS] Help with systemd

2015-09-23 Thread Clint Dilks
> > > Mind you I only work with ant very rarely but what should work is this: > /path/to/ant -buildfile /greenstone/gs3/build,xml -Dbasedir=/greenstone/gs3 > Dennis your suggestion works well so for the moment I am going with # Systemd unit file for Greenstone 3 [Unit] Description=Greenstone 3