I have a scenario where I don't want to allow end-user to download the file but I want for them to install the required tool on their Mac machine using the package of FTP. Is there any way that allows the user to run the command from Terminal and execute the package without downloading it. While googling, I saw the option of wget but I am still researching to know whether it is doable or not. Kindly share me your opinion on it.
If you can host the package on a web site, the installation can be reduced to the following two commands.
Download the file to the local computer:
/usr/bin/curl https://www.example.com/mypackage.pkg > /tmp/mypackage.pkg
Install the downloaded file:
/usr/sbin/installer -pkg /tmp/mypackage.pkg -target /
You can combine these commands in a text file called
#!/bin/bash /usr/bin/curl https://www.example.com/mypackage.pkg > /tmp/mypackage.pkg /usr/sbin/installer -pkg /tmp/mypackage.pkg -target / /bin/rm /tmp/mypackage.pkg
.command file is opened by the user, the package will be downloaded and installed.
This approach assumes:
- The software is distributed as a flat
- You can host the package somewhere privately.
sftp instead of
Please note this script has no error checking. Consider this script a starting point for your own script.
You could add a password to your web site and then use a URL with the credentials embedded, such as
Given you have
ssh access to the computers, you could run this script or commands remotely.