Posted on 02-06-2015 11:32 AM
Need to delete an application and then reinstall a newer version. Tried a script:
#!/bin/bash
rm -rf /Applications/PCClient.app
It didn't work. Tried to execute it as a command. Issued it over Self Service and couldn't get it to work on my laptop.
If it matters, we're running our JSS on a Windows server.
Posted on 02-06-2015 10:21 PM
Is the script executable?
If you do the following in Terminal:
ls -la /path/to/script.sh
What do you get?
Posted on 02-06-2015 11:22 PM
@markbgomez, did you deploy the app via a DMG?
If so, you in Casper Admin... Index the DMG & then tick "Allow this dmg to be uninstalled via policy or remote"
Then create a policy or script that removes the old version & installs the new.
Even if it wasn't deployed via a DMG, you could create one of the old app & do the above.
Posted on 02-07-2015 05:35 PM
Thanks. I'll test both of those on Monday. The app wasn't deployed by DMG, but I could try creating one.
Posted on 02-08-2015 11:53 AM
Hi, if its just a one-liner I would add it straight into the policy, rather than running a separate script. The syntax all looks fine to me and it should be running as root if its via Casper.
I would look at the policy logs as that would normally tell you the error / reason why (e.g. no such file or directory, permission denied etc).