Linux upstart configuration
This commit is contained in:
parent
53aede83dc
commit
0093bc61cb
9
linux/README
Normal file
9
linux/README
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
The files on this folder should be placed (with execute permissions) on your *nix with upstart capabilities to have osrm running as a daemon. You have to be root to do it.
|
||||||
|
|
||||||
|
Check the usr/bin/osrm file before proceed, as it will assume you have your code on /opt/Project-OSRM.
|
||||||
|
|
||||||
|
To give execute permission to this files, you can do:
|
||||||
|
# chmod +x $file
|
||||||
|
|
||||||
|
More info on upstart:
|
||||||
|
http://upstart.ubuntu.com/cookbook/
|
||||||
34
linux/etc/init/osrm.conf
Normal file
34
linux/etc/init/osrm.conf
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
# osrm
|
||||||
|
|
||||||
|
description "OpenRouteServiceMachine"
|
||||||
|
author "delawen <marias@emergya.com>"
|
||||||
|
|
||||||
|
# Stanzas
|
||||||
|
#
|
||||||
|
# Stanzas control when and how a process is started and stopped
|
||||||
|
# See a list of stanzas here: http://upstart.ubuntu.com/wiki/Stanzas#respawn
|
||||||
|
|
||||||
|
# When to start the service
|
||||||
|
start on runlevel [2345]
|
||||||
|
|
||||||
|
# When to stop the service
|
||||||
|
stop on runlevel [016]
|
||||||
|
|
||||||
|
# Automatically restart process if crashed
|
||||||
|
respawn
|
||||||
|
|
||||||
|
# Essentially lets upstart know the process will detach itself to the background
|
||||||
|
expect fork
|
||||||
|
|
||||||
|
# Start the process
|
||||||
|
|
||||||
|
#script
|
||||||
|
# echo "Starting OSRM..."
|
||||||
|
# cd /home/devel/Project-OSRM/
|
||||||
|
# ./osrm-routed &
|
||||||
|
# echo "OSRM started"
|
||||||
|
# cd $pwd
|
||||||
|
#end script
|
||||||
|
|
||||||
|
exec osrm
|
||||||
|
|
||||||
9
linux/usr/bin/osrm
Normal file
9
linux/usr/bin/osrm
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
#This script assumes you have your OSRM compiled on the /opt/Project-OSRM folder. You should change that path to adecuate it to your needs.
|
||||||
|
|
||||||
|
echo "Starting OSRM..."
|
||||||
|
cd /opt/Project-OSRM/
|
||||||
|
./osrm-routed &
|
||||||
|
echo "OSRM started"
|
||||||
|
cd $pwd
|
||||||
|
|
||||||
Loading…
Reference in New Issue
Block a user