diff -Nru valhalla-server-1.0.12/debian/changelog valhalla-server-1.0.12/debian/changelog --- valhalla-server-1.0.12/debian/changelog 2016-08-30 02:25:35.000000000 +0000 +++ valhalla-server-1.0.12/debian/changelog 2016-08-30 03:06:30.000000000 +0000 @@ -1,3 +1,9 @@ +valhalla-server (1.0.12-ubuntu1~trusty7) trusty; urgency=medium + + * Fixed pidfile and added log file. + + -- Michal Migurski Mon, 29 Aug 2016 20:06:15 -0700 + valhalla-server (1.0.12-ubuntu1~trusty6) trusty; urgency=medium * Added working (?) pidfile. diff -Nru valhalla-server-1.0.12/debian/valhalla-server.init valhalla-server-1.0.12/debian/valhalla-server.init --- valhalla-server-1.0.12/debian/valhalla-server.init 2016-08-30 02:25:17.000000000 +0000 +++ valhalla-server-1.0.12/debian/valhalla-server.init 2016-08-30 03:06:10.000000000 +0000 @@ -21,8 +21,7 @@ echo "Could not start: valhalla-server is currently running." 1>&2 exit 1 else - mkdir -p /var/run/valhalla-server - valhalla_route_service /etc/valhalla-server.json 2>&1 >/dev/null & + valhalla_route_service /etc/valhalla-server.json 2>&1 >>/var/log/valhalla-server.log & echo $! > /var/run/valhalla-server.pid echo "valhalla-server started" fi @@ -32,6 +31,7 @@ if [ -e /var/run/valhalla-server.pid ]; then ## Program is running, so stop it kill `cat /var/run/valhalla-server.pid` + rm /var/run/valhalla-server.pid echo "valhalla-server stopped" else ## Program is not running, exit with error.