folder deletion and shutdown

Brad_G
Contributor II

I want to pass a couple questions to the group to see if others have had success with either of these items.

First has to do with folder deletion. We currently deploy an image through NetBoot/NetRestore that has all of our common applications. This was set up before we began using Casper. I have an updated application that installs into a different folder. Is there a way in my policy that deploys this new application to send a UNIX command such as "rm -R /Applications/Old Application" before installing the new one? Or does that need to be built into a script that deploys first and then is followed by the new installation?

The second question relates to energy conservation. We've been charged with an initiative to help reduce power consumption. Currently we use Workgroup Manager (again this was setup prior to Casper) to manage many of the preferences. You can set power on and power off times that appear to work. Does anyone do something similar through a Casper policy? Also I'm wondering if it would be a good idea in that policy to have the cron utilities run at either shutdown or startup to make sure those tasks are dealt with. How do your organizations handle this?

Thanks for any suggestions as I dive deeper into Casper.......

Brad

---------------------------------------------------------------------
Brad Gunnells
University of Iowa
Information Technology Services
Campus Technology Services/Learning Spaces Technology
Iowa City IA 52242
(319)335-5524 FAX (319)335-5505
mailto:brad-gunnells at uiowa.edu
---------------------------------------------------------------------

6 REPLIES 6

milesleacy
Valued Contributor

First question: Use the "Run Command" field in the "advanced" tab of a
policy or Casper Remote. I'd suggest writing a script to uninstall your app
and storing the script in the JSS for use in policies & such.
Second question: Type "man pmset" in Terminal. The pmset command should
allow you to do anything you like with power management.

I've got lots of scripts I use now and have used in the past for managing
systems. Casper can work hand in hand with Open Directory MCX management,
or you can manage the same settings via scripts that are deployed via
policies. Of course, if you want to get fancy, you can manage MCX on the
local directory using dscl.

----------
Miles A. Leacy IV

? Certified System Administrator 10.4
? Certified Technical Coordinator 10.5
? Certified Trainer
Certified Casper Administrator
----------
voice: 1-347-277-7321
miles.leacy at themacadmin.com
www.themacadmin.com

Not applicable

Miles,

Do you know at what point 'Run Command' runs? Before or After?

milesleacy
Valued Contributor

I believe "Run Command" is the last action performed in a policy, but you
may want to check with JAMF support to confirm.

Any output from the command is written to the policy log or remote log, so
it can be very useful for collecting information.

----------
Miles A. Leacy IV

? Certified System Administrator 10.4
? Certified Technical Coordinator 10.5
? Certified Trainer
Certified Casper Administrator
----------
voice: 1-347-277-7321
miles.leacy at themacadmin.com
www.themacadmin.com

ernstcs
Contributor III

That is correct it runs last. I wish I could insert various commands through out a policy at the points I wanted. Build the policy step by step using a pop-up interface similar to building smart groups. Delete files command here, uninstall packs here, install packs here, run commands here, run advanced options here, run another command here, and reboot.

Craig Ernst
UW-Eau Claire
(715) 836-3639

Sent from my iPhone

milesleacy
Valued Contributor

A feature request I thought of in this vein is script priorities.
I tend to be very modular in my scripting for easy interchangeability. This
means my scripts usually accomplish a single, simple task, such as "turn off
IPv6", rather than "fully configure all network settings".

I've run into situations where script priorities would be useful in making
sure that the prerequisites are met before running script "X".

----------
Miles A. Leacy IV

? Certified System Administrator 10.4
? Certified Technical Coordinator 10.5
? Certified Trainer
Certified Casper Administrator
----------
voice: 1-347-277-7321
miles.leacy at themacadmin.com
www.themacadmin.com

ernstcs
Contributor III

I very much agree!

Craig Ernst
UW-Eau Claire
(715) 836-3639

Sent from my iPhone