Hi folks. Other confusion with nginx. I'm trying some regular log rollovers and want to kill the process.
I have read that after moving and renaming my
That is the proper location of the
That kill command throws an error manually:
Can I just insert a
I have read that after moving and renaming my
nginx.log
, I want to do this:
Code:
kill -USR1 $( cat /var/run/nginx.pid )
That is the proper location of the
pid
file. The kill stops the server so it can release that binding to the log, and the -USR1
forces a new log. That kill command throws an error manually:
Code:
kill: usage: kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l [sigspec]
Can I just insert a
sudo nginx service restart
in a script run in the crontab
?