JoeZhao

跨出界

Hey, I’m JoeZhao, a software engineer, and a gamer.

Regularly check the network status of Unraid and restart if necessary.

The main purpose is to solve the problem of the machine suddenly dropping its IP address, so I wrote a simple monitoring script.

This is a simple trick, you can directly use the User Scripts Plugin of unraid CA.

Create a new script, fill in the name and description as you like, and the script content is as follows:

#!/bin/bash
ping fun2ex.com -c 1 >/dev/null
if [ $? -ne 0 ];then
# powerdown -r
echo `date` powerdown restart >> /tmp/powerdown_logs.txt
fi

corn-check-network-for-unraid-1

The check time is set manually, just add it according to the cron rules. Considering the time for the array to shut down, I set it to check every 30 minutes.

# cron setting
*/30 * * * *

corn-check-network-for-unraid-2

--EOF--

Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.