Posted on 02-23-2015 10:03 AM
Is it possible to put 2 different commands in the 'execute command' section of the payload 'files and processes'?
I currently have an lpadmin -p ........ command in it and wanted to see if it was possible to also add an additional command such as jamf policy -trigger <triggername>
would i need to separate the two with a comma, semicolon ?
Solved! Go to Solution.
Posted on 02-23-2015 10:07 AM
You can separate the commands with a semicolon, or use a script payload instead.
Posted on 02-23-2015 10:07 AM
You can separate the commands with a semicolon, or use a script payload instead.
Posted on 02-23-2015 10:17 AM
You can use a && e.g:
ls /Users && ls /Library
Posted on 02-23-2015 10:32 AM
@davidacland's answer is good if the second command is reliant on the first. For example:
mkdir ~/Desktop/test; cp /some/files ~/Desktop/test
might act strangely if there was a problem creating the directory, whereas
mkdir ~/Desktop/test && cp /some/files ~/Desktop/test
will only execute the second command if the first returns a zero exit status.
Even more fun, you can use "||" to run the second command only if the first one produces a failure (non-zero exit status).
Posted on 02-23-2015 10:48 AM
basically this is what i want to have done via 'files and processes' --> 'execute command'
i know i can also do it in a script, i like to give both ways a shot
lpadmin -p MathLab_Xer4112_Rm200 -o printer-is-shared=false; jamf policy -trigger TESTXeroxDriverCustomEvent