From c4d96716c05c41a3b18f2326cb588cd19246da5f Mon Sep 17 00:00:00 2001 From: zachir Date: Fri, 12 Aug 2022 04:30:51 -0500 Subject: initial commit --- toggle | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100755 toggle (limited to 'toggle') diff --git a/toggle b/toggle new file mode 100755 index 0000000..28dda1e --- /dev/null +++ b/toggle @@ -0,0 +1,9 @@ +#!/sbin/sh + +if type disown >/dev/null; then + killall $1 ; $@ >/dev/null & disown +elif type setsid >/dev/null; then + killall $1 ; setsid -f $@ >/dev/null & +else + sh -c "killall $1 ; $@ >/dev/null &" +fi -- cgit v1.2.3