D
D
David2016-03-16 22:38:07
PHP
David, 2016-03-16 22:38:07

How to restart server daemon from php?

There is WsServer (works according to the example of the article ). As far as I understand, all changes take effect after a reboot. Is it possible to restart the "daemon" without access to the server (hosting)?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Valery Selitsky, 2016-03-16
@MiragePresent

run the server inside a loop in a bash sprit and all that's left is to kill the process as needed. For example, it will work well exit;:)
UPD:
With the help of a bash script with a loop, it is also convenient to track application return codes and handle errors accordingly or use them as restart options prerequisites.
If this is unnecessary, you can simply configure the application to run as a self-healing service.

E
entermix, 2016-03-16
@entermix

Use exec

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question