Link to home
Start Free TrialLog in
Avatar of Luis Diaz
Luis DiazFlag for Colombia

asked on

Linux haproxy: stop temporary haproxy service

Helllo experts,

I used haproxy for a linux load balancer.

The following command allows me to check the status of haproxy.

sudo service haproxy status

Open in new window


And the following allows me to restart the service.

sudo service haproxy restart

Open in new window



I was wondering which command should I use to stop haproxy and make it unavailable for a certain time and then restart the service to make it available again.

Thank you again for your help.
Avatar of gheist
gheist
Flag of Belgium image

if you type
sudo service haproxy
you get a list of all options.
most likely it is 'stop'
Avatar of Luis Diaz

ASKER

Thank you for this proposal.

I tried the sudo service haproxy command however I don't have the information related to start/stop.

User generated image
Avatar of skullnobrains
skullnobrains

it is "stop" indeed if you just need to stop it

you can disable it using "systemctl disable service" ( beware the name of the service is weird so list services first with "systemctl list"

or you can use "chkconfig haproxy off"

agreed, whoever decided to name these commands in such a way or give them inconsistent switches deserves painful treatment
regarding your above screenshot, you need to use
"sudo service --help"
the above is the help of haproxy and you want the help of the service command
Thank you for your comment.

I have the same information with the help command.
please type in exactly what i posted and include what you type and receive in your screenshots or copy-paste.
there is no way you'd get the above screenshot ( help of haproxy ) with the command i gave which does not even contain the word haproxy
also note that haproxy features both a command protocol and a GUI that will let you disable individual frontends or backends if it is enabled
ASKER CERTIFIED SOLUTION
Avatar of skullnobrains
skullnobrains

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thank you very much for your help.
Your last proposal works for me.