Advertisement
Guest User

Untitled

a guest
Mar 30th, 2017
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 0.85 KB | None | 0 0
  1. diff --git a/sysutils/consul-alerts/files/consul-alerts.in b/sysutils/consul-alerts/files/consul-alerts.in
  2. index b98dda641de..f24e46f59ca 100644
  3. --- a/sysutils/consul-alerts/files/consul-alerts.in
  4. +++ b/sysutils/consul-alerts/files/consul-alerts.in
  5. @@ -16,6 +16,8 @@
  6.  
  7.  . /etc/rc.subr
  8.  
  9. +export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin
  10. +
  11.  name=consul_alerts
  12.  rcvar=consul_alerts_enable
  13.  
  14. @@ -28,5 +30,11 @@ pidfile=/var/run/consul-alerts.pid
  15.  procname="%%PREFIX%%/bin/consul-alerts"
  16.  command="/usr/sbin/daemon"
  17.  command_args="-f -p ${pidfile} /usr/bin/env ${consul_alerts_env} ${procname} start ${consul_alerts_args}"
  18. +stop_cmd="stop_consul"
  19. +
  20. +stop_consul() {
  21. +       echo "Killing all consul_alerts process."
  22. +       ps ax | grep '[c]onsul watch -http-addr' | cut -d' ' -f1 | xargs kill -9
  23. +}
  24.  
  25.  run_rc_command "$1"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement