What do you want to save?
Add Code snippet
New code examples
-
Other 2022-02-20 04:55:11
Start / Restart / Stop Nginx Commands
sudo systemctl start nginx sudo systemctl stop nginx sudo systemctl restart nginx sudo service nginx start sudo service nginx stop sudo service nginx restart sudo /etc/init.d/nginx start sudo /etc/init.d/nginx stop sudo /etc/init.d/nginx restart Add solution -
Other 2021-08-27 03:11:01
start a service in bash if stopped
#!/bin/bash SERVICE="nginx" if pgrep -x "$SERVICE" >/dev/null then echo "$SERVICE is running" else echo "$SERVICE stopped" # uncomment to start nginx if stopped # systemctl start nginx # mail ... Add solution
Best helpers
Ranking is empty