Upload file from Mac via Online KScript
So I have an Online KScript that does everything I want it to except for Upload a file. The script zips a folder of logs from another program and uploads it so I can review them later. The Zip file is only about 3.5MB.
However, when I run the script, it always fails and never uploads the file. This is the only line I get about the upload in the log:
"Uploading file: /Library/Application\ Support/Dell/KACE/data/kbots_cache/packages/kbots/239 cpfiles.zip"
As you can see, it looks like it's adding a space between the folder and the filename for some reason. I've tried adding a "/" to the end of the directory, but it just does "239/ cpfiles.zip," still with a space. I've put the filename in with the directory and left the filename part blank, but it still failed.
Does anyone know how to get an Online KScript to upload a file from a Mac? Alternatly, do you know how to get an Online Shell Script to upload a file to the K1000 server? Or anywhere else?
Answers (2)
I'm not immediately aware of a way to upload a file to the K1000 like this. I don't believe it's possible (or at least easy). To my knowledge, you would have to upload the clientdrop folder (\\yourk1000\clientdrop) and to do that you would have to provide samba credentials.
Depending on what's in the logs you might be able to create a custom inventory rule to read file, although it probably would have to be unzipped.
Something like this: ShellCommandTextReturn(cat /path/to/file.txt)
Comments:
-
I've used the Upload a file feature before on Windows and it's worked without issue. It uploads to the "Uploaded files" section of the computer in Inventory. Here's a screenshot of the function: http://dropbox.biola.edu/Akkk8
However, I cannot get it to work with Mac. It seems like it's having some problem with Syntax.
I'll try uploading it to the client drop in a shell script, but I wonder if there's an answer to why this will work with windows and not Mac? or if I'm doing something differently. - mrhollywoodgates 11 years ago-
Wow, I didn't know that feature even existed. I'd suggest enabling debug, running the script and then opening a support ticket with the debug logs.
Mac commands for enabling debug on 5.3/5.4 agent are:
1. To automatically set debug through a script:
Scripting>K1000 Agent Debug Log Enable (Mac/Linux)
Add the machine(s) you want to enable debug on to;Limit Deployment To Listed Machines; and click Run Now.
2. How to manually set debug:
Â
a. Open Terminal by going to ‘Applications>Utilities.
b. Execute: sudo /Library/Application\ Support/Dell/KACE/bin/AMPTools debug=true
Send all of the .log and .conf files from Library/Application\ Support/Dell/KACE/data - jknox 11 years ago
-
Thanks for the suggestion! I'll give that a try when I get time. For the time being I took your other idea and uploaded it to the clientdrop via mount_smbfs in a shell script - mrhollywoodgates 11 years ago
Thanks! - dlcaldwell 8 years ago