kill-hup pid
Where PID is the process identity. Use this command if you want to change the configuration without stopping and restarting the service. After making the necessary changes to the configuration file, issue the command to dynamically update the service configuration.
Example:
Restart Nginx:
# kill-hup ' Cat/app/nginx/nginx.pid '
Restart the HTTPD service:
# Ps-a | grep httpd | Grep-v grep | awk ' {print '} ' | Xargs-l 1 Kill-hup
PS and grep commands are used to search for httpd in all processes (and to ignore the grep process used to search for httpd processes). Next, awk displays only the process ID in the output and passes it to Xargs. The Xargs command then accepts each process ID (because the-l 1 is used to fetch one row at a time) and uses Kill-hup to send a pending signal to the appropriate process.
In the example: Restart the sshd service
Change the/etc/ssh/sshd_config, the port inside to the new ports, such as 28, and then Kill-hup ' Cat/var/run/sshd.pid ' on the line.
The existing connection itself will not be broken, because Kill-hup ' cat/var/run/sshd.pid ' is just the one HUP listening, the established connection (different PID) will not break. Then you exit under the existing account and log in with the new port.
This article is from the "willing to share with you" blog, please be sure to keep this source http://9265463.blog.51cto.com/9255463/1774210
Use of the Kill-hup command