update ubus-status.sh
This commit is contained in:
@@ -11,8 +11,6 @@ do
|
||||
datetime=$(date +"%Y-%m-%d %H:%M:%S")
|
||||
pidcount=$(pgrep "ubusd" | wc -l)
|
||||
pidcount2=$(pgrep "rpcd" | wc -l)
|
||||
pidv=$(pgrep "ubusd" | head -n 1)
|
||||
pidv2=$(pgrep "rpcd" | head -n 1)
|
||||
|
||||
if [ "$pidcount" -gt 1 ]; then
|
||||
killall ubusd
|
||||
@@ -23,18 +21,16 @@ do
|
||||
|
||||
if [ "$pidcount2" -gt 1 ] && [ "$pidcount" -eq 1 ]; then
|
||||
killall rpcd
|
||||
sleep 1
|
||||
/sbin/rpcd -s /var/run/ubus/ubus.sock -t 30 &
|
||||
fi
|
||||
|
||||
if [ -z "$pidv" ]; then
|
||||
if [ "$(pgrep ubusd | wc -l)" -eq 0 ]; then
|
||||
/sbin/ubusd &
|
||||
killall rpcd
|
||||
sleep 1
|
||||
/sbin/rpcd -s /var/run/ubus/ubus.sock -t 30 &
|
||||
fi
|
||||
|
||||
if [ -z "$pidv2" ]; then
|
||||
if [ "$(pgrep rpcd | wc -l)" -eq 0 ]; then
|
||||
/sbin/rpcd -s /var/run/ubus/ubus.sock -t 30 &
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user