pia-foss / manual-connections

Scripts for manual connections to Private Internet Access
MIT License
566 stars 168 forks source link

date error on macOS #144

Open ghost opened 2 years ago

ghost commented 2 years ago

On macOS the function in the get_token.sh script will throw an error:

130-zsh%  date "+%c" --date='1 day'
date: illegal time format
usage: date [-jnRu] [-d dst] [-r seconds] [-t west] [-v[+|-]val[ymwdHMS]] ... 
            [-f fmt date | [[[mm]dd]HH]MM[[cc]yy][.ss]] [+format]

A macOS user can use GNU date by installing via homebrew: brew install coreutils And then changing the command in the script from date to gdate

g00nix commented 2 years ago

Thank you for the report!

I am actually happy to hear those are the only modifications required to make the script work on Mac. Do you mind creating and maintaining a fork? We could add it to the readme in the 3rd party section.

Bougakov commented 1 year ago

On mac, the script also throws "The resolvconf package could not be found." One cannot use the Wireguard as the result, since DNS isn't working (can only access websites by IP, not by a host name)

DasLampe commented 1 year ago

@Bougakov please open up an new issue, this is not related to the date command.

Please specify also your macOS version in the new issue.