Hi Bernie,

I would like to see something like this contributed :). E.g. it would be
nice to have a similar packaging in maven as ElasticSearch has:
https://github.com/elasticsearch/elasticsearch/tree/master/src/deb
which also has a start/stop script:
https://github.com/elasticsearch/elasticsearch/blob/master/src/deb/init.d/elasticsearch

I have a stupid script (I'm not really good in bash stuff) which just sets
export GH_FOREGROUND=false
export GH_PID_FILE=somefile.pid

those variables will be recognized by the graphhopper.sh script. Then I
check the PID file content, if not available I do something like:
/usr/bin/nohub ./graphhopper.sh web some.pbf >> file.log 2>&1

Running this as a different user is simple:
sudo -u <user> script.sh
in script.sh you should check if $USER is really <user>

Regards,
Peter.

On 11.09.2014 09:03, Jan Torben Heuer wrote:
> I’m running a Graphhopper Application using „commons-deamon“ and jsvc. Works 
> very well. You can just use the basic shell template and you need a „fat 
> jar“. I use the maven-shade-plugin for that. If you want to go the extra 
> mile, add the maven-jdeb-plugin plugin and an upstart script...
>
> Jan
>
> Am 11.09.2014 um 08:08 schrieb Bernhard Tschirren <[email protected]>:
>
>> Hi,
>>
>> Has anybody out there written the scripts needed to run GraphHopper as 
>> service on Ubuntu? We'd like to automatically run GH on startup - but as a 
>> specific user (not root). I don't want to re-invent the wheel - if possible.
>>
>> Thanks,
>>
>> Bernie
>> _______________________________________________
>> GraphHopper mailing list
>> [email protected]
>> https://lists.openstreetmap.org/listinfo/graphhopper
>
> _______________________________________________
> GraphHopper mailing list
> [email protected]
> https://lists.openstreetmap.org/listinfo/graphhopper


_______________________________________________
GraphHopper mailing list
[email protected]
https://lists.openstreetmap.org/listinfo/graphhopper

Reply via email to