From ae4a14ebde7a7f8f08820dd52d5e4d8da3287a03 Mon Sep 17 00:00:00 2001 From: Simon Bruder Date: Thu, 6 Jun 2019 21:02:27 +0000 Subject: [PATCH] [bin] add spawn-once helper script --- home/bin/spawn-once | 4 ++++ 1 file changed, 4 insertions(+) create mode 100755 home/bin/spawn-once diff --git a/home/bin/spawn-once b/home/bin/spawn-once new file mode 100755 index 0000000..ce64c7d --- /dev/null +++ b/home/bin/spawn-once @@ -0,0 +1,4 @@ +#!/bin/sh +if ! ps cx|grep "$1\$" >> /dev/null; then + exec $@ +fi