summaryrefslogtreecommitdiff
path: root/toggle
blob: 28dda1eff9655ca21e2569e4fccb0ff9239e888d (plain)
1
2
3
4
5
6
7
8
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