Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- # Purpose: Copy installer from remote, centralized software repo and install.
- # Date: 2/15/2017
- # Version: 1.2
- ### As with all scripts, it needs to be ran as root. Checking credentials.
- if [ "$USER" != "root" ]; then
- echo "************************************"
- echo "You are attempting to execute this process as user $USER"
- echo "Please execute the script with elevated permissions."
- exit 1
- fi
- # Now we need to authenticate with domain credentials
- read -p 'Please enter your network username:' domainusername
- read -s -p 'Please enter your AD password: ' domainpass
- function setup()
- {
- # Now we need to make a mount point for the NFS share.
- mkdir /Volumes/local_directory
- mount_smbfs "//$domainusername:$domainpass@servername.ad.company.com/folder_name" /Volumes/local_directory
- #Example software
- echo "Copying over Skype For Business..."
- cp /Volumes/local_directory/SkypeForBusiness.pkg ~/Desktop
- echo "Copying over Microsoft Office 2016..."
- cp /Volumes/local_directory/Microsoft_Office.pkg ~/Desktop
- echo "Installing Skype for Business for Mac:"
- /usr/sbin/installer -pkg ~/Desktop/"SkypeForBusiness.pkg" -target "/"
- echo
- echo "Skype for Business is now installed."
- echo
- echo "Installing Microsoft Office 2016 for Mac:"
- echo
- /usr/sbin/installer -pkg ~/Desktop/"Microsoft_Office.pkg" -target "/"
- echo
- echo "Microsoft Office 2016 for Mac is now installed."
- echo "Removing install files. "
- rm ~/Desktop/Microsoft_Office.pkg
- rm ~/Desktop/SkypeForBusiness.pkg
- umount /Volumes/local_directory
- }
- setup
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement