Trying to create something for my self-service for the end user to send the local Jamf log to the server for the team to be able to review - although I've never run into an error like this. Grateful for any input
Script as follows:
#!/bin/bash
##Get the serial number
serialNumber=$(system_profiler SPHardwareDataType | awk '/Serial Number/{print $4}')
##Get computer ID
id=$(curl -sku api:api -H "accept: text/xml" https://OURJAMFURL/JSSResource/computers/serialnumber/$serialNumber -X GET | xmllint --xpath '/computer/ general/id/text()' - )
##API call to upload the system log to the computer running the policy
curl -sku api:api https://OURJAMFURL/JSSResource/fileuploads/computers/id/$id -F "name=@/private/var/log/jamf.log; filename=system-`date +%F\\ %T`.log" -X POST
And the error is:
##Script result: <html>
<head>
<title>Status page</title>
</head>
<body style="font-family: sans-serif;">
<p style="font-size: 1.2em;font-weight: bold;margin: 1em 0px;">Conflict</p>
<p>API file upload exception:java.lang.IllegalArgumentException: NTFS ADS separator (':') in file name is forbidden.</p>
<p>You can get technical details <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.10">here</a>.<br>
Please continue your visit at our <a href="/">home page</a>.
</p>
</body>
</html>