Skip to content

Instantly share code, notes, and snippets.

@rubnet
Last active December 17, 2021 03:24
Show Gist options
  • Save rubnet/337eaa438a5effeab83fdd75330027d1 to your computer and use it in GitHub Desktop.
Save rubnet/337eaa438a5effeab83fdd75330027d1 to your computer and use it in GitHub Desktop.
keep mysqld alive
#!/bin/bash
pgrep mysqld
if [ $? -ne 0 ]
then
/etc/init.d/mysqld restart > /dev/null
fi
@rubnet
Copy link
Author

rubnet commented Dec 17, 2021

*/6 * * * * bash /root/monitorSQL.sh >/dev/null
crontab -e

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment