-2

I would like HAProxy on my Ubuntu 14.04 to restart each time I SCP a new HAProxy config file. What is the easiest/cleanest way to achieve this?

Michael Hampton
  • 244,070
  • 43
  • 506
  • 972

1 Answers1

4

Use inotify to monitor the file change and have it execute a script or command that does the haproxy config reload or a full restart.

https://superuser.com/questions/181517/how-to-execute-a-command-whenever-a-file-changes

https://stackoverflow.com/questions/12264238/restart-process-on-file-change-in-linux

JayMcTee
  • 3,923
  • 1
  • 13
  • 22