Explorar o código

Fixed stats path

pmacko hai 6 días
pai
achega
f4b0b5ae41
Modificáronse 1 ficheiros con 4 adicións e 4 borrados
  1. 4 4
      update.sh

+ 4 - 4
update.sh

@@ -67,8 +67,8 @@ TRIGGER=$(grep pro /proc/cpuinfo | grep -v model -c)
 if [ "$LOAD" -ge "$TRIGGER" ];
 then
         echo -e "\e[1;31m$LOAD1\e[0m $LOAD23 system \e[1;31mLOAD\e[0m"
-        sed -i '/clear/d' /usr/bin/process-stat.sh
-        /usr/bin/process-stat.sh
+        test -f /bin/process-stat.sh && sed -i '/clear/d' /bin/process-stat.sh
+        test -f /bin/process-stat.sh && /bin/process-stat.sh
 else
         echo -e "\e[1;32m$LOAD1\e[0m $LOAD23 system \e[1;32mLOAD\e[0m"
 fi
@@ -81,8 +81,8 @@ MEMORY=$(cat /tmp/umem)
 if [ "$MEMPER" -gt "75" ];
 then
         echo -e "\e[1;31m$MEMORY\e[0m consumed \e[1;31mRAM\e[0m"
-        sed -i '/clear/d' /usr/bin/memory-stat
-        /usr/bin/memory-stat
+        test -f /bin/memory-stat && sed -i '/clear/d' /bin/memory-stat
+        test -f /bin/memory-stat && /bin/memory-stat
 else
         echo -e "\e[1;32m$MEMORY\e[0m consumed \e[1;32mRAM\e[0m"
 fi