From: Tom Hughes Date: Thu, 17 Oct 2013 23:15:36 +0000 (+0100) Subject: Add support for the status action to the gps-update service X-Git-Url: https://git.openstreetmap.org/chef.git/commitdiff_plain/cea89bc150194bbcef908eaa29cd64141ba82b85 Add support for the status action to the gps-update service --- diff --git a/cookbooks/gps-tile/recipes/default.rb b/cookbooks/gps-tile/recipes/default.rb index d92bff63a..2a4db9582 100644 --- a/cookbooks/gps-tile/recipes/default.rb +++ b/cookbooks/gps-tile/recipes/default.rb @@ -87,7 +87,7 @@ end service "gps-update" do action [ :enable, :start ] - supports :restart => true + supports :restart => true, :status => true subscribes :restart, "git[/srv/gps-tile.openstreetmap.org/updater]" end diff --git a/cookbooks/gps-tile/templates/default/update.init.erb b/cookbooks/gps-tile/templates/default/update.init.erb index 95aeeebd6..1cf851d2b 100644 --- a/cookbooks/gps-tile/templates/default/update.init.erb +++ b/cookbooks/gps-tile/templates/default/update.init.erb @@ -10,6 +10,10 @@ stop() { start-stop-daemon --stop --retry 300 --pidfile /var/run/gps-update.pid } +status() { + start-stop-daemon --status --pidfile /var/run/gps-update.pid +} + case "$1" in start) start @@ -21,4 +25,8 @@ case "$1" in stop || exit $? start ;; + status) + status + exit $? + ;; esac