-
Notifications
You must be signed in to change notification settings - Fork 435
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Better way to restart services #1
Comments
Actually, by-convention files in In case you like to work on this I will rename it to |
I'm always ready to work with Linux & Shell Scripts. |
Cool. You can rename Once your scripts starts working well, we can create a web-based wrapper around it.Rahul Bansal | Founder & CEO | rtCamp Solutions Pvt. Ltd. On Thu, Sep 13, 2012 at 6:59 PM, Mitesh Shah [email protected]:
|
Sometime service is failed to stop/start/restart in this case
https://github.com/rtCamp/rtAdmin/blob/master/zzz/restart.sh is not able to detect weather the service is restarted successfully or not.
I've some solutions for this problems
!/bin/bash
Restart the MySQL Service
service mysql restart
MySQL Restarted Susscessfully?
CHECK=$(echo $?)
If MySQL Is Not Restarted
Then Restart MySQL Service
while [ $CHECK -gt 0 ]
do
#echo In While $CHECK
service mysql restart
CHECK=$(echo $?)
done
Restart the PHP5-FPM Service
service php5-fpm restart
PHP5-FPM Restarted Susscessfully?
CHECK=$(echo $?)
If PHP5-FPM Is Not Restarted
Then Restart PHP5-FPM Service
while [ $CHECK -gt 0 ]
do
#echo In While $CHECK
service php5-fpm restart
CHECK=$(echo $?)
done
The text was updated successfully, but these errors were encountered: