Posted on 03-11-2019 01:25 PM
So I use to have a script that downloaded PIA VPN but now when I run a curl command on terminal using
' curl https://www.privateinternetaccess.com/installer/x/download_installer_osx '
it just shows the website in plain text rather than an app can anyone offer any insights what is the best way to go about this?
Posted on 03-13-2019 01:08 AM
The file address is https://installers.privateinternetaccess.com/download/pia-macos-1.1.1-02545.zip
You could try
curl --silent "https://installers.privateinternetaccess.com/download/pia-macos-1.1.1-02545.zip" -o /tmp/pia-macos.zip
Is this part of any automated process?
Posted on 03-13-2019 02:47 AM
Yea it is automated got it sorted now. Used this script
mkdir -p /Volumes/Macintosh HD/Users/Shared/temp
cd /Volumes/Macintosh HD/Users/Shared/temp
curl -LO https://www.privateinternetaccess.com/installer/x/download_installer_osx
PIAURL=$(cat download_installer_osx | grep .zip | grep -Eo "(http|https)://[a-zA-Z0-9./?=-]")
PIAZIP=$(ls | grep *.zip)
curl -LO $PIAURL
open /Volumes/Macintosh HD/Users/Shared/temp/Private Internet Access Installer.app
rm -rf /Volumes/Macintosh HD/Users/Shared/temp
Posted on 10-17-2022 03:41 AM
Three years later I find this solution. But somehow your GREP only returns 'https://i' Maybe something went wrong with the copy/paste in here?
GREP is not my specialty, so I am having a hard time trying to get it to work. If anyone has any tips?
Posted on 03-14-2019 08:57 AM
@Euwanh Thanks for the script. I have something similar I want to achieve but I want the site i'm going to to m.meraki.com requires that I input a value. I've used the POST command to add value but may be doing it wrong. Any suggestions?
Posted on 09-02-2019 01:17 AM
@tomatoes27 sorry for the very long delay did you need further assistance with this? I know how daunting it can be when you first start using jamf and then have to write scripts