Explorar el Código

Bail if the load is high

Zachary Kotlarek hace 13 años
padre
commit
524f4366ba
Se han modificado 1 ficheros con 5 adiciones y 0 borrados
  1. 5 0
      sync.sh

+ 5 - 0
sync.sh

@@ -29,6 +29,11 @@ if [ -z "${SUB_DIR}" ] || [ $NUM_FILES -lt 1 ] || [ $DELAY_DAYS -lt 1 ]; then
 	exit 1
 fi
 
+# Bail if the load is high
+if ! ~/bin/video/checkLoad.sh; then
+	exit 0
+fi
+
 # Allow usage with absolute local paths
 if [ "`echo "${SUB_DIR}" | head -c 1`" == '/' ]; then
 	BASE_LOCAL="`dirname "${SUB_DIR}"`"