Posted on 07-29-2010 05:18 PM
I just cleaned up a bit of a mess that I made with a policy that updated Firefox and am wondering if anyone has any suggestions as to how to do it better in the future.
I created a policy that updates Firefox to the 3.6.8 version using a trigger of restart and "once per computer", scoped to "all managed computers". The policy was using a .dmg created in casper using the preloaded config for Firefox. I edited it down to only update the application and none of the user files. It worked fine on a couple of test machines, but when deploying to ~100 machines, I'd already had a failure on 4 of the first 40 machines. I didn't dig into it, but it seems that the actual application package was damaged and the app would launch and then immediately quit. It wasn't a permissions error and didn't happen to all users (most were fine). Replacing the app from the downloaded disk image fixed the issue.
Would there be a better way than using a .dmg? Is the restart trigger an appropriate one for doing something like this?
Any suggestions would be appreciated.
Thanks!
Aaron
Posted on 07-30-2010 12:15 AM
Hi Robert,
Robert Hammen <rhlist1 at hammen.org> wrote:
Awesome, the only other question (hope you don't mind if I pick your brain again <g>), what about config files? You know, the "about:config" settings made to the Firefox application. Are those stored in the users' home directory(ies) as well? Specifically settings that are for all users (like proxy settings made in Firefox)?
Thanks,
Don
Posted on 07-30-2010 12:18 AM
I've played with this quite a bit... you can create lockprefs to overwrite what a use may have set and lock it down... similar to what is described here: http://kb.mozillazine.org/Locking_preferences
Posted on 07-30-2010 04:47 AM
If you use a dmg and don't delete the old application first, you'll create an app bundle that's a "hybrid" of whatever version of Firefox that was on the system, and the new version.
On Jul 29, 2010, at 8:18 PM, Aaron wrote:
I use a bash script, which runs before the install, doing the following:
1) kills the Firefox process if it's running
2) deletes the app from /Applications if it exists there
Works perfectly. Have the same issue with trying to deploy updated versions of Casper's Self Service app (which is why I wish the app could auto-update itself).
#!/bin/bash
killall Firefox
[ -d /Applications/Firefox.app/ ] && /bin/rm -rf /Applications/Firefox.app
Posted on 07-30-2010 08:17 AM
Hi Robert,
On Jul 30, 2010, at 6:47 AM, Robert Hammen wrote:
This is brilliant! Another one to check off our list. I tested, works like a charm. Maybe this should be a JAMF KB?
PS, our users aren't using any "extensions" or add-ins...but I wonder if the above would effect any who might be? I'm hoping Firefox stores these user specific resources in the users' home directory(ies)?
Don
Posted on 07-30-2010 09:14 AM
Bingo, they're installed in the user's profile folder (in the extensions folder), so that's not a concern when deleting the app package.
Posted on 03-10-2015 10:18 AM
@RobertHammen 's little script for killing Firefox was brilliant, but I've had some inconsistent results. Maybe things have changed with newer OS's ? The problem seems to be with the killall Firefox.
So I started trying to implement a version that tries to determine Firefox's process number first and then kills that.
kill awk '$4~/firefox/{print $1}' <(ps -x)
[ -d /Applications/Firefox.app/ ] && /bin/rm -rf /Applications/Firefox.app
But that has been inconsistent as well.
Posted on 03-10-2015 01:38 PM
@rcorbin I'm confused why anyone is having an issue. Once an app is run in OS X, the .app is no longer called, all of the app is put into object references in ram and there is no need to even have the .app anymore. Matter of fact, when i do firefox updates, i don't kill it at all. I just override it if it's open. The next time they open firefox they will have the new app.
Posted on 03-23-2015 04:01 PM
I noticed a script today posted by @joe.farage It's totally awesome.
https://jamfnation.jamfsoftware.com/viewProductFile.html?id=72&fid=764
It looks at the latest version of Firefox out there and compares it to what you have. If needed it goes out and grabs the latest version and installs it. It is very much like the excellent Flash and Java update scripts by @rtrouton
The only issue I have is I'm trying to set it up as a self service script. It actually works perfectly but Self Service often says there was an error even though the script exit code was 0 and I can't see any issues.