Skip to content

Instantly share code, notes, and snippets.

@mmb
Created July 27, 2009 02:17
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 mmb/155997 to your computer and use it in GitHub Desktop.
Save mmb/155997 to your computer and use it in GitHub Desktop.
turn dd-wrt web gui on only when you need it
#!/bin/sh
# turn dd-wrt web gui on only when you need it
ROUTER=192.168.0.1
USER=root
[ "$1" = "on" ] && COMMAND="httpd -h /www -S"
[ "$1" = "off" ] && COMMAND="kill \`cat /tmp/var/run/httpsd.pid\`"
ssh ${USER}@${ROUTER} ${COMMAND}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment