Skip to content

Instantly share code, notes, and snippets.

@ddworken
Last active March 30, 2016 19:49
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 ddworken/d87e8f36496325890685f257e994d59e to your computer and use it in GitHub Desktop.
Save ddworken/d87e8f36496325890685f257e994d59e to your computer and use it in GitHub Desktop.
toggles openvpn
#!/bin/bash
if $(/usr/sbin/service openvpn status | grep -q 'Active: active'); then
/usr/sbin/service openvpn stop
else
/usr/sbin/service openvpn start
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment