]> git.openstreetmap.org Git - chef.git/commitdiff
Add support for the status action to the gps-update service
authorTom Hughes <tom@compton.nu>
Thu, 17 Oct 2013 23:15:36 +0000 (00:15 +0100)
committerTom Hughes <tom@compton.nu>
Thu, 17 Oct 2013 23:15:36 +0000 (00:15 +0100)
cookbooks/gps-tile/recipes/default.rb
cookbooks/gps-tile/templates/default/update.init.erb

index d92bff63a79f0e976efc759b1c799d048f88f239..2a4db9582652f7bd3abf8bca5f1cd5876557d28c 100644 (file)
@@ -87,7 +87,7 @@ end
 
 service "gps-update" do
   action [ :enable, :start ]
 
 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
 
   subscribes :restart, "git[/srv/gps-tile.openstreetmap.org/updater]"
 end
 
index 95aeeebd6ff93f56493c501a70b814e8ef5864c6..1cf851d2bb2ca2d97d8e772ec0da0b193eba647f 100644 (file)
@@ -10,6 +10,10 @@ stop() {
   start-stop-daemon --stop --retry 300 --pidfile /var/run/gps-update.pid
 }
 
   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
 case "$1" in
   start)
     start
@@ -21,4 +25,8 @@ case "$1" in
     stop || exit $?
     start
     ;;
     stop || exit $?
     start
     ;;
+  status)
+    status
+    exit $?
+    ;;
 esac
 esac