Skip to content
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

Closed
MiteshShah opened this issue Sep 13, 2012 · 3 comments
Closed

Better way to restart services #1

MiteshShah opened this issue Sep 13, 2012 · 3 comments

Comments

@MiteshShah
Copy link
Member

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

@rahul286
Copy link
Member

Actually, by-convention files in /zzz/ folder are ignored! ;-)

In case you like to work on this I will rename it to /sh/ so that you can take care of nginx scripting part. :-)

@MiteshShah
Copy link
Member Author

I'm always ready to work with Linux & Shell Scripts.

@rahul286
Copy link
Member

Cool.

You can rename zzz folder and to sh folder and start working for now.
I will try to refractor my php codes and move them to php folder.

Once your scripts starts working well, we can create a web-based wrapper

around it.

Rahul Bansal | Founder & CEO | rtCamp Solutions Pvt. Ltd.
Skype: rahul286 | Twitter: @rahul286 | Web: http://rtcamp.com/

On Thu, Sep 13, 2012 at 6:59 PM, Mitesh Shah [email protected]:

I'm always ready to work with Linux & Shell Scripts.


Reply to this email directly or view it on GitHubhttps://github.com/rtCamp/rtAdmin/issues/1#issuecomment-8527995.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants