-
-
Save george124816/73f0ea8065ef029f491d059803e45da5 to your computer and use it in GitHub Desktop.
VPN Script
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/elixir | |
System.argv() | |
|> case do | |
["up"] -> | |
System.cmd("nmcli", ["connection", "up", "work"]) | |
|> IO.inspect() | |
["down"] -> | |
System.cmd("nmcli", ["connection", "down", "work"]) | |
|> IO.inspect() | |
["restart"] -> | |
System.cmd("nmcli", ["connection", "down", "work"]) | |
|> IO.inspect() | |
System.cmd("nmcli", ["connection", "up", "work"]) | |
|> IO.inspect() | |
_ -> | |
IO.puts("invalid command") | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment