Fixed errors when no log file is specified

This commit is contained in:
Louwrentius 2009-01-10 12:46:01 +00:00
parent 0e9885a1c8
commit 630d566068

10
ppss.sh
View File

@ -39,13 +39,14 @@ trap 'kill_process; ' INT
# Setting some vars. Do not change.
SCRIPT_NAME="Parallel Processing Shell Script"
SCRIPT_VERSION="1.04"
SCRIPT_VERSION="1.05"
RUNNING_SIGNAL="$0_is_running"
GLOBAL_LOCK="PPSS-$RANDOM-$RANDOM"
PAUSE_SIGNAL="pause.txt"
ARRAY_POINTER_FILE="array-pointer-$RANDOM-$RANDOM"
JOB_LOG_DIR="job_log"
LOGFILE="ppss-log.txt"
MAX_DELAY=2
PERCENT="0"
PID="$$"
@ -145,6 +146,7 @@ is_running () {
fi
}
# If no arguments are specified, show usage.
if [ $# -eq 0 ]
then
showusage
@ -218,6 +220,12 @@ do
esac
done
# Init log file
if [ -e "$LOGFILE" ]
then
rm $LOGFILE
fi
init_vars () {
echo 0 > "$ARRAY_POINTER_FILE"