diff options
-rw-r--r-- | daemon.sh | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -2,11 +2,11 @@ TMP=${TMPDIR-/tmp}/daemon -running=$(ps -u `whoami` -U `whoami` -o comm|grep -- "$1") +running=$(pgrep -u `whoami` "$1") if [ -z "$running" ]; then mkdir -p "$TMP" echo "daemon: starting $1" nohup $@ > "$TMP/$1.out" 2> "$TMP/$1.err" & else echo "daemon: $1 is already running" -fi
\ No newline at end of file +fi |