Last active
September 16, 2019 07:13
-
-
Save hangj/bad667f05069c1c6fec17e524fc0cd8a to your computer and use it in GitHub Desktop.
run/reload openresty
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
#!/usr/bin/bash | |
cd ~/work/ || exit | |
sudo openresty -p `pwd` -c conf/nginx.conf -t || exit | |
ps -ef | grep openresty | grep -v grep | |
if [ $? -eq 0 ] | |
then | |
sudo openresty -p `pwd` -c conf/nginx.conf -s reload | |
else | |
sudo openresty -p `pwd` -c conf/nginx.conf | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment