Several common pagoda panel environment process daemon scripts (MySQL, nginx, php, and Redis are restarted regularly)

Sometimes we may make mistakes when using the pagoda panel to set timed tasks. For example, we often have database pauses. Here we can use some timed scripts to restart the database or nginx. There are four commonly used timing daemon scripts to choose from.

 Several common pagoda panel environment process daemon scripts (MySQL, nginx, php, and Redis are restarted regularly) - Page 1

Here, we can use several automatic restart scripts.

1. MySQL restart script

 pgrep -x mysqld &> /dev/null if [ $? - ne 0 ];then bash /www/server/panel/script/rememory.sh /etc/init.d/mysqld start fi

2. Nginx restart script

 pgrep -x nginx &> /dev/null if [ $? - ne 0 ];then /etc/init.d/nginx start fi

3. Memcached restart script

 pgrep -x memcached &> /dev/null if [ $? - ne 0 ];then /etc/init.d/memcached restart fi

4. Redis Restart Script

 pgrep -x redis &> /dev/null if [ $? - ne 0 ];then /etc/init.d/redis start fi

5. Php fpm restart script

 pgrep -x php-fpm &> /dev/null if [ $? - ne 0 ];then /etc/init.d/php-fpm-{52|53|54|55|56|70|71|73} restart fi

For example, our database often stops. You can set a regular restart of the MYSQL database and set a cycle. For example, it can be restarted at 12:00 every morning.

Vote for you

Source: Lao Jiang Tribe » Several common pagoda panel environment process daemon scripts (MySQL, nginx, php, and Redis are restarted regularly) |Welcome to share (public account: Chiang's circle of friends)

Get new information from webmaster/add QQ group from the public account "Chiang Kai shek's circle of friends"【 one billion twelve million four hundred and twenty-three thousand two hundred and seventy-nine 】Get preferential promotion from merchants