automating helper tool install

145 views
Skip to first unread message

Lee Ramsay

unread,
Mar 13, 2015, 11:28:31 AM3/13/15
to autopkgr...@googlegroups.com
Hi there,

I'm trying to munki down autopkgr for some of my juniors to look at, but it prompts on first run for a helper tool install.

I browsed the .app, had a quick browse around the github repo, and googled a fair bit, and can't find anyone with a script that takes care of this for you.

I'd really like to be able to put this in a munki post-install, and I imagine lots of other people would too.

I read somewhere that it puts down a privileged helper tool, 2 launch daemons, and an entry in the system keychain. It's not something I'd like to try and reverse engineer if it's avoidable.

Can anyone help a brother out?

Lee Ramsay

Eldon Ahrold

unread,
Mar 19, 2015, 3:32:08 PM3/19/15
to autopkgr...@googlegroups.com
So to automate installation of the  helper tool is simple

1) Copy the helper tool binary from inside of the application bundle /Applications/AutoPkgr.app/Contents/Library/LaunchServices/com.lindegroup.AutoPkgr.helper to /Library/PrivilegedHelperTools/

2) Create and load a launchd.plist in /Library/LaunchDaemons/com.lindegroup.AutoPkgr.helper.plist with the following keys*.


<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
 
<key>Label</key>
 
<string>com.lindegroup.AutoPkgr.helper</string>
 
<key>MachServices</key>
 
<dict>
 
<key>com.lindegroup.AutoPkgr.helper</key>
 
<true/>
 
</dict>
 
<key>ProgramArguments</key>
 
<array>
 
<string>/Library/PrivilegedHelperTools/com.lindegroup.AutoPkgr.helper</string>
 
</array>
</dict>
</plist>


* make sure the file is 644 root:wheel

Here's a script that handles a similar situation,  you could extrapolate what you need and make it AutoPkgr specific.
https://github.com/eahrold/MunkiMenu/blob/master/Scripts/postinstall.py all you'll need is the copyHelper(helper_id,app_path) and writeHelperLaunchD(helper_id) parts.

Reply all
Reply to author
Forward
0 new messages