vlaci / openconnect-sso

Wrapper script for OpenConnect supporting Azure AD (SAMLv2) authentication to Cisco SSL-VPNs
GNU General Public License v3.0
299 stars 131 forks source link

Background Parameter Not Functioning When Arguments Are Passed After "--" #141

Open lucashtc opened 1 year ago

lucashtc commented 1 year ago

When passing arguments after the "--" delimiter, the -b or --background parameter does not function as expected. To achieve the desired behavior, it is necessary to pass the parameter multiple times.

openconnect-sso -s novaoivpn.oi.net.br --log-level=DEBUG -- --background --pid-file=/run/openconnect-sso-vpn.pid --script=vpn/pos_vpn.sh --background

Output: ['sudo', 'openconnect', '--useragent', 'AnyConnect Linux_64 xxxxxxx', '--version-string', 'xxxxxx', '--cookie-on-stdin', '--servercert', 'xxxxxxxxxxxxxxxxxxxxxxxxxx', '--pid-file=/run/openconnect-sso-vpn.pid', '--script=vpn_oi_scripts/pos_vpn.sh', '--background', 'https://xxxxxxx.xx.net.br/']

I'm using Branch Master

gms1 commented 1 year ago

seems also work if just the "--" delimiter is entered twice e.g

openconnect-sso -s vpnserver-url -- -- --background --pid-file=....

HiMyNameIsIlNano commented 1 year ago

Thanks @gms1! This has fixed my issue with the background option.