Merge "Include Postgres tables and maintenance scripts for Change I23c47c2c"
[lhc/web/wiklou.git] / bin / ulimit5.sh
index 3f24172..fd8aae2 100644 (file)
@@ -9,8 +9,8 @@ fi
 if [ "$3" -gt 0 ]; then
        ulimit -f "$3"
 fi
-if [ "$4" -gt 0 ]; then
-       timeout $4 /bin/bash -c "$5"
+if [ "$4" -gt 0 -a -x "/usr/bin/timeout" ]; then
+       /usr/bin/timeout $4 /bin/bash -c "$5"
        STATUS="$?"
        if [ "$STATUS" == 124 ]; then
                echo "ulimit5.sh: timed out." 1>&2