Originally Posted by
ssam
would this work
Code:
#!/bin/bash
killall firefox || firefox &
Actually, it wouldn't work on Ubuntu. Unless they've changed something from debian, you'd have to do:
Code:
#!/bin/sh
killall firefox-bin || firefox &
and even then, you're not really guaranteed that script will do what you want. You'd need something more complicated to ensure firefox will properly exit and you'll only start firefox when one was killed, you only kill the right process, etc.
The idea is right though. I'm not sure it's the best implementation though.
Bookmarks