![]() ![]() Macosv=`sw_vers -productVersion | cut -d. #v1.2 - Opt out of brew analytics, thanks Geo for finding thisĮcho "`basename "$0"` MUST run as root." #v1.1 - Typeo and fixed missing group folders He is my bash script for deploying brew via Self Service #!/bin/bash Osascript -e 'tell application "Terminal" to quit'ĭo script ("/usr/bin/ruby -e "$(curl -fsSL )"") in window 1 # Open non-admin safe Terminal window, install Homebrew and wait until process is complete before continuing # Running caffeinate command so system doesn't bork the Homebrew installĮcho "Caffeinating the mac under process id: $caffeinatepid" I removed those from below as you'll do that via Self Service. We have other applications that install via brew during deployment so they would also run those commands in this script which is why Homebrew has a pause while Window 1 of Terminal is active so they don't overlap each other. It also doesn't require the user to be an admin (which is preferred for Homebrew installs) so if your techs aren't onboarding, this is safe to run as a pre-stage or self service for users. ![]() Eventually we switched over to this script deployed via Self Service policy which I modified from 's post in this threadĪnd it's been the most consistent experience for us. We've spent a lot of time trying to install homebrew without interaction and unattended. The "no tty present and no askpass program specified" message is essentially saying that the install timed out waiting for Return to be pressed. Sudo: no tty present and no askpass program specifiedįailed during: /usr/bin/sudo /bin/chmod u+rwx /usr/local/bin The Homebrew installer has a "Press return to continue or any other key to abort" verification step in its installer. => /usr/bin/sudo /bin/chmod u+rwx /usr/local/bin /usr/local/sbin => The following new directories will be created: => The following existing directories will have their group set to admin: => The following existing directories will have their owner set to test2u: => The following existing directories will be made group writable: usr/local/share/zsh/site-functions/_brew This is the result of the script through Self Service. usr/sbin/dseditgroup -o edit -d $loggedInUser -t user admin ![]() Sudo -u $loggedInUser /usr/bin/ruby -e "$(curl -fsSL )" usr/sbin/dseditgroup -o edit -n /Local/Default -a "$loggedInUser" -t user adminĮcho "User $loggedInUser is now an admin" LoggedInUser=`python -c 'from SystemConfiguration import SCDynamicStoreCop圜onsoleUser import sys username = (SCDynamicStoreCop圜onsoleUser(None, None, None) or ) username = ] (username + " This is the script I'm trying to run to install brew #!/bin/sh You can add multiple scripts to run as one policy in Self Service. Sudo -u $user echo "PATH=/usr/local/bin:$PATH" > /Users/$user/.bash_profile bash_profile with new path but checking there isn't one already Git fetch origin master:refs/remotes/origin/master -n ![]() #Modifying permissions and creating directories User=`ls -la /dev/console | cut -d " " -f 4` On my test machine with a user in the Admin Group, it installs just fine-what am I missing? It sounds to me like Brew wants LESS privs to complete. Suite: line 8: Exit: command not foundĮrror running script: return code was 127. Library/Application Support/JAMF/tmp/HSD Dev. Mounting MY JSS SERVER to /Volumes/Images.įilling user home directories from /Volumes/DSH Developer Suite/Users/asite.įilling user templates from /Volumes/DSH Developer Suite/Users/asite. Note: GCC is what is really needed and Brew seemed to be the easiest way. I get the following error when I am testing. As for Brew/GCC, I thought it would be as simple as creating a shell script and pushing via policy. I was able to package TeXShop just fine using Composer. I just got an 11th hour request for TeXshop, GCC, and Brew to be installed in one of our labs (classes start today). ![]()
0 Comments
Leave a Reply. |