scripts/run-once

9 lines
148 B
Plaintext
Raw Permalink Normal View History

2015-04-25 19:16:45 +03:00
#! /bin/bash
# Run program unless it's already running.
if [ -z "`ps -Af | grep -o -w ".*$1" | grep -v grep | grep -v run-once`" ]; then
$@
fi