Skip to content

Commit

Permalink
reset_tailscale_auth()
Browse files Browse the repository at this point in the history
Signed-off-by: Markus Storm <markus.storm@gmx.net>
  • Loading branch information
mstormi committed Aug 24, 2023
1 parent 604fbec commit 9c629a1
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions functions/vpn.bash
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,9 @@ install_tailscale() {
##
## setup_tailscale(String action)
##
## argument 1 is tailscape key
## argument 2 is tailscale tags
##
setup_tailscale() {
local preAuthKey="${1:-${preauthkey}}"
local tags="${2:-${tstags}}"
Expand All @@ -255,3 +258,19 @@ setup_tailscale() {

return 0
}


## reset tailscale VPN auth with new key
##
## reset_tailscale_auth(String tskey, tags)
##
## argument 1 is tailscape key
## argument 2 is tailscale tags
##
reset_tailscale_auth() {
local preAuthKey="${1:-${preauthkey}}"
local tags="${2:-${tstags}}"

tailscale up --reset --authkey "${preAuthKey}" --advertise-tags="${tags}"
}

0 comments on commit 9c629a1

Please sign in to comment.