diff --git a/security/tailscale/Makefile b/security/tailscale/Makefile index 390cb5f50d63..e041a8b7991a 100644 --- a/security/tailscale/Makefile +++ b/security/tailscale/Makefile @@ -1,5 +1,6 @@ PORTNAME= tailscale PORTVERSION= 1.32.0 +PORTREVISION= 1 DISTVERSIONPREFIX= v CATEGORIES= security net-vpn diff --git a/security/tailscale/files/tailscaled.in b/security/tailscale/files/tailscaled.in index f70c8cd71873..cfa72604f5e3 100644 --- a/security/tailscale/files/tailscaled.in +++ b/security/tailscale/files/tailscaled.in @@ -19,6 +19,8 @@ # Default is "daemon". See daemon(8). # tailscaled_exitnode_enable (bool): Set it to YES to announce tailscaled as # an exit node. Default is "NO". +# tailscaled_up_args (str): Additional arguments to pass to tailscale up +# Default is "" (empty string). # tailscaled_tun_dev (str): Set the name of the tun interface tailscaled creates. # Default is "tailscale0" @@ -32,6 +34,7 @@ load_rc_config $name : ${tailscaled_enable:="NO"} : ${tailscaled_port:="41641"} : ${tailscaled_exitnode_enable:="NO"} +: ${tailscaled_up_args:=""} : ${tailscaled_tun_dev:="tailscale0"} DAEMON=$(/usr/sbin/daemon 2>&1 | grep -q syslog ; echo $?) @@ -78,7 +81,10 @@ tailscaled_poststart() { if checkyesno tailscaled_exitnode_enable; then logger -s -t tailscale "Enabling Exit node mode" - ${ctlname} up --advertise-exit-node + tailscaled_up_args=" --advertise-exit-node ${tailscaled_up_args}" + fi + if [ -n "${tailscaled_up_args}" ]; then + ${ctlname} up ${tailscaled_up_args} fi }