#!/bin/sh TIMEOUT=20 export TEMP=/tmp LOGFILE=/tmp/gs-moodle.log /usr/bin/timeout $TIMEOUT /usr/bin/gs $@ returncode=$? if [ "$returncode" -eq 124 ]; then echo "$(date -Iseconds) - GS command timed out: /usr/bin/gs $@" >> $LOGFILE fi exit $returncode