Skip to content

Instantly share code, notes, and snippets.

@rkachowski
Created May 3, 2010 09:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rkachowski/387913 to your computer and use it in GitHub Desktop.
Save rkachowski/387913 to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
#a script to toggle netbook launcher in UNR
#check processes to see if netbook-launcher is running
l = `ps -A | grep netbook-launch`
#get the proces id
p_id = l.strip.split(" ").first
#kill the process if it exists, else start one
p_id ? `kill -9 #{p_id} > /dev/null &` : `netbook-launcher > /dev/null &`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment