Created
May 19, 2020 08:26
-
-
Save 3mrdev/3b1c9c12923dffe7c126b022ebd80789 to your computer and use it in GitHub Desktop.
Simple Bash Script To Restart Odoo Server After Out of Memory Crash
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
#!/bin/bash | |
SERVICE=/odoo/odoo-server/odoo-bin | |
if ps ax | grep -v grep | grep $SERVICE > /dev/null | |
then | |
#echo "1" | |
echo "$SERVICE is running well at `date`" >> /home/firebits/restart.log | |
else | |
#echo "2" | |
echo "$SERVICE is not running. Restarting... at `date`" >> /home/firebits/restart.log | |
/etc/init.d/odoo-server start > /dev/null | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment