summaryrefslogtreecommitdiff
path: root/toggle
blob: aca0a470f1fc40faadb4f0f773dd3edc9c2b3328 (plain)
1
2
3
4
5
6
7
8
9
#!/bin/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