Welcome! Log In Create A New Profile


Centos init.d reload script

Posted by Danack 
Centos init.d reload script
February 03, 2014 06:15PM

I've installed nginx 1.4.4 from the repository at http://nginx.org/packages/centos/ for Centos 6.4

The reload command in the init.d script that comes with that sends the HUP signal to Nginx which then attempts to reload the config. However if there is an error in the config file:
i) The error is just sent to the error log file.
ii) The init.d script says 'OK' when Nginx hasn't reloaded the config.

Would it be possible to change the init.d script in the package to call nginx -s reload directly - so that any errors are reported by the init.d script and in the users console. i.e. like:

reload() {
echo -n $"Reloading $prog: "
${nginx} -s reload

if [ $RETVAL == 0 ]

If this question is inappropriate for this forum - apologies, please could you tell me where it would be more appropriate to ask.

Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 137
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready