Created
October 14, 2014 15:38
-
-
Save paulghaddad/9a6ab481d4a98e6a2b0e to your computer and use it in GitHub Desktop.
Level Up 1: Understands init scripts and can use init.d to start and stop services
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. On a Linux development VM, use init scripts to restart sshd. Y'know, just in case. | |
sshd requires execution with an absolute path, so use,'which sshd' to find the path: /usr/sbin/sshd | |
sudo service ssh start | |
sudo service ssh restart | |
2. Let's pretend you just changed your nginx config, and want to reload the changes without stopping the service altogether. Invoke the init script without any arguments to see valid choices. Now run the correct init command to parse and load the config without stopping the server. | |
sudo service nginx reload |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment