What is the script variable for the scripts folder?
In writing an online shell script, I'm creating a log file which I want to upload to the K1000 appliance using the "Upload file" feature. That feature says the default directory is "the script directory", which by poking around I have decided seems to be (on the Macintosh) /Library/Application Support/Dell/KACE/data/scripts/xxx
The K1000 variable $(KACE_DATA_DIR) will get me to the /Library/Application Support/Dell/KACE/data/ directory, and I can manually add "/scripts", but what I need is to know the xxx part of the equation, and I don't see any variable that gives me that. Does such a variable exist?
Thanks!
The K1000 variable $(KACE_DATA_DIR) will get me to the /Library/Application Support/Dell/KACE/data/ directory, and I can manually add "/scripts", but what I need is to know the xxx part of the equation, and I don't see any variable that gives me that. Does such a variable exist?
Thanks!
0 Comments
[ + ] Show comments
Answers (1)
Answer Summary:
There doesn't seem to be a KACE environment variable for this directory; you'll have to hard-code it. rockhead44 pointed out that during script creation, the script is given a number, which you can find by going back out one level to the list of scripts, hovering over your script, and looking at the status line at the bottom of the browser window. Thanks, rockhead44!
There doesn't seem to be a KACE environment variable for this directory; you'll have to hard-code it. rockhead44 pointed out that during script creation, the script is given a number, which you can find by going back out one level to the list of scripts, hovering over your script, and looking at the status line at the bottom of the browser window. Thanks, rockhead44!
Please log in to answer
Posted by:
rockhead44
7 years ago
Top Answer
That is the number that corresponds to your script. Click your script on the K1000 and check the number at the end of the URL to identify it.
Comments:
-
Yes, I could hardcode that number into my script as a "magic number", but that's not the right way to do it. There should be a KACE environment variable that tells me that number at run-time. If there's not, there's not, but there should be. - kentwest 7 years ago