]> git.openstreetmap.org Git - chef.git/blob - cookbooks/planet/templates/default/streaming.init.erb
Run old planet file cleanup on first Monday of the month.
[chef.git] / cookbooks / planet / templates / default / streaming.init.erb
1 #!/bin/bash
2
3 # DO NOT EDIT - This file is being maintained by Chef
4
5 start() {
6   start-stop-daemon --start --chuid planet --background --make-pidfile --pidfile /var/run/<%= @service %>.pid --exec /usr/local/bin/<%= @service %>
7 }
8
9 stop() {
10   start-stop-daemon --stop --retry 300 --pidfile /var/run/<%= @service %>.pid
11 }
12
13 status() {
14   start-stop-daemon --status --pidfile /var/run/<%= @service %>.pid
15 }
16
17 case "$1" in
18   start)
19     start
20     ;;
21   stop)
22     stop
23     ;;
24   restart)
25     stop || exit $?
26     start
27     ;;
28   status)
29     status
30     ;;
31 esac