exit 0
fi
-# Prepare vars
-CMD=$*
-
# Validate input
if [ -z "$HOME" ];
then
error "no home specified"
fi
-if [ -z "$CMD" ];
+if [ -z "$*" ];
then
error "no command specified"
usage;
fi
# Execute the command
- $CMD 2>&1
+ "$@" 2>&1
) | tee "$OUTDIR/app.log"
## Because of the keepalive mechanism, we're sure that by the time