#JNUC - Maintain Your Sanity with Self Service

jonah
New Contributor II

Self Service is an incredibly powerful tool for IT. By leveraging your users to perform common tasks, we can focus our time on the more important things that need to get done every day.

Join us Thursday afternoon, 2:15pm at the McGuire Proscenium Stage to learn how 4 of your peers are doing amazing things with Self Service. While most of the time will be spent talking about the Self Service Application, you will also get a chance to see what a large enterprise organization is using with custom applications to empower users to do things outside of the Self Service we all know and love.

Hope to see you there!

11 REPLIES 11

dderusha
Contributor

Hello
Thank you all so much for coming to the session! There were some excellent questions from the audience and one was about the cache cleaner. Here is the script. As a bonus the cache cleaner will also notify your users that it is done cleaning the cache.

#!/bin/sh
#Created July 10-2012 By Dan De Rusha
sudo atsutil databases -remove
atsutil server -shutdown
Sleep 5
atsutil server -ping
sudo jamf displayMessage -message "Font Cache Cleaned"

Let us know if you have any other question or suggestions about the content covered.

Thanks to everyone that stayed until the end. We were cutting into happy hour and without your great questions I don't think the session would have been as successful!

Andrina
Contributor
Contributor

During the session we were chatting about Self Service Plugins, and how the URL plugin forces the "http://" into the URL when sometimes you may want something else (think file:// or vnc:// - the possibilities are endless!!) Anyhow, to skirt around the plugin having the http:// prepended to the URL each time plugins are touched in the JSS I've set up a policy to run once a day on user machines to edit out the offender in the individual files - here shown as "filename.plist" but will usually have some number there which will be constant across all your machines.

sed -i "" s'/http:////'g /Library/Application Support/JAMF/Self Service/Managed Plug-ins/filename.plist

Andrina
Contributor
Contributor

Oh, and if you'd like to see that http:// be more of an option in the JSS - there's an existing feature request to request a change of behaviour here - https://jamfnation.jamfsoftware.com/featureRequest.html?id=503

jacob_salmela
Contributor II

Does anyone have similar scripts to the font cache flusher? Or is anyone else doing anything similar to this (below)?

I am setting up policies for Self Service that run the functions on the Advanced tab of Casper Remote. For example, from Self Service, users can:

  • rebuild the Spotlight index for better searches
  • Clear user cache
  • Clear system cache
  • Install all software updates
  • Clear the font cache (script posted by dderusha above)
  • Update inventory (recon)

I've used the OnyX app to clean computers sometimes and would like to get all of those tasks as Self Service items, but I was wondering what other people are doing, if anything?

RWitt
New Contributor II

I was upstairs getting some info on packaging during this session is there anyway you could post the slides so i can get a little bit of what was covered. Thanks

jonah
New Contributor II

I will check with the presenters about sharing their screen shots. Expect an update here shortly. Thanks!

donmontalvo
Esteemed Contributor III

Is it a good idea to run atsutil databases -remove when a user is logged in to the Mac? Or did you mean atsutil databases -removeUser? Not sure it's a good idea to use the -shutdown flag unless you reboot immediately.

From man atsutil:

**databases [-remove | -removeUser]**
     **-remove** remove fontd databases for active user and system (used when no
     one is logged in and some background processes).
     **-removeUser** remove fontd databases for the active user only.

...and...

**server** queries the status of fontd or shutdowns the fontd.  Shutting down
     the fontd will spawn a new fontd.  Shutting down the server is NOT recom-
     mended and will likely lead to misrendered text or application crashes.

We provide some groups with a Self Service item that prompts the user to save/quit everything (reboot coming), runs atsutil databases -remove and triggers a reboot, to avoid any stability issues. The reboot also respawns fontd of course. Some groups ask us to schedule this as a weekly task, so for those Macs the policy runs off hours and only if the Mac is at the Login Window (so no danger of triggering an immediate reboot).

PS, if this does work, it'll be fantastic! I'm just asking since we've run into problems before and so we're always open to new ideas if they make it easier to give users the 'fixes' they need. :)

Don

--
https://donmontalvo.com

dderusha
Contributor
Is it a good idea to run atsutil databases -remove when a user is logged in to the Mac? Or did you mean atsutil databases -removeUser? Not sure it's a good idea to use the -shutdown flag unless you reboot immediately.

Don- according to the man page, it may be better to use -removeUser. In our testing -remove worked, there were no issues reported, something worth testing! I would also agree with your shutdown statement, in our testing it was a non issue. We instruct the users to quit their applications before running so their Apps aren't trying to use cached fonts. It's just easier to say reboot, but quitting the applications has worked out

donmontalvo
Esteemed Contributor III

I wonder if someone at Apple is monitoring this thread. Looks like as of Mountain Lion they just updated their manpage for atsutil to give a bit more explicit warning regarding use of -shutdown switch. :)

[color=red]-shutdown shutdown fontd and spawn a new fontd. NOTE: this action is not recommended.[/color]

$ man atsutil | tail -13

    server [-ping | -shutdown]
    -ping** query running fontd.
    -shutdown** shutdown fontd and spawn a new fontd. NOTE: this action is not recommended. See above.

SEE ALSO
     fontd(8)

HISTORY
     atsutil first appeared in MacOS X 10.5.

Mac OS        November 2, 2012        Mac OS
$
--
https://donmontalvo.com

makander
Contributor
We provide some groups with a Self Service item that prompts the user to save/quit everything (reboot coming), runs atsutil databases -remove and triggers a reboot, to avoid any stability issues. The reboot also respawns fontd of course. Some groups ask us to schedule this as a weekly task, so for those Macs the policy runs off hours and only if the Mac is at the Login Window (so no danger of triggering an immediate reboot).

@donmontalvo, would you mind sharing how you're doing this?

I was thinking about being brutal and build a script that forces a reboot after the atsutil database -remove but maybe that's a bit drastic?

Thank you!

donmontalvo
Esteemed Contributor III

@makander wow totally didn't know you posted that. If purging user font caches, force a logout. If purging system font caches, force a reboot. By force, I mean give the users a head up and opportunity to save their changes. :)

--
https://donmontalvo.com