Skip to content

Instantly share code, notes, and snippets.

@RicoP
Created June 5, 2012 10:32
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save RicoP/2874299 to your computer and use it in GitHub Desktop.
Save RicoP/2874299 to your computer and use it in GitHub Desktop.
simple server script
#!/bin/sh
#copy directly into /usr/bin
if [ -s /tmp/__pserver ]; then
kill `cat /tmp/__pserver`
fi
python -m SimpleHTTPServer 1>>/dev/null 2>>/tmp/log.pserver &
echo -n $! > /tmp/__pserver
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment