Hi everyone, am trying to learn how to restart Caddy whenever I change the Caddyfile. I read the following link https://caddyserver.com/docs/cli
From what I could see am guessing I would send the USR1 signal to the process. I tried the following ways:
kill -USR1 1234
killall -s USR1 caddy
pkill -USR1 caddy
But I believe none of them worked, the reason is that I sabotaged the Caddyfile in order to check if it would fail when during the restart. I added a number on the url of the site, so instead of saying https://www.mysite.com it says 1https://www.mysite.com (Prefixed with the 1) but after sending the signals above it did not fail. It simply kept on going.
Am comparing this to literally killing Caddy and then manually starting it again with caddy &
When I manually do this, it fails correctly saying that there is a 1 in the url. But when I send the signals it does not. Now my question is:
- Is this a bug?
- Am I sending the signals in a wrong way?
- Is there a parameter to restart Caddy (eg: caddy --restart)
- Are the signals sent actually working but caddy reloads the script and fixes the configuration?
Basically, what is going on here, am I wrong or am I missing something?