Embed KBOX Hostname in Mac Client Install
Answers (7)
sh -c 'KACE_SERVER=kace.dickinson.edu installer -pkg /tmp/AMPAgent.pkg -target /'
So I first send the package to /tmp/AMPAgent.pkg using the copy files command, and then run the shell script as root to actually perform the installation.
This might be helpful to you:
Using Packagemaker.app, I was able to get the k1000 address to register on the clients by re-bundling the AMPAgent.pkg with the amp.conf file. The amp.conf file is located in /Library/Application Support/Dell/KACE/data. This file stores the kace server address and company name. Tell packagemaker to place this file in the same directory after the ampagent installs.
I also added a post-install script to force an initial check-in by using the following applescript:
tell application "Terminal"
activate
delay 0.5
do shell script "sudo /Library/Application\ Support/Dell/KACE/bin/runkbot 1 0"
end tell
I was directed to this thread by the *brilliant* Dell Enterprise KACE Support because we have been trying to inject our kace1000 address to the 5.5.904xxx client for Mac and after install do a runkbot 2 0 to check the mac into Kace, and we have had no straight answer from them, except this post.
I tried the solution presented of pushing the amp.conf with Packages into the pkg file, but I dont understand how to run the postinstall script since that is apple script. when I run it I get an error:
Untitled 5.sh: line 1: tell: command not found
Untitled 5.sh: line 2: activate: command not found
Untitled 5.sh: line 3: delay: command not found
Untitled 5.sh: line 4: syntax error near unexpected token `do'
Untitled 5.sh: line 4: `do shell script "sudo /Library/Application\ Support/Dell/KACE/bin/runkbot 1 0"'
Can someone please advice on this?
As a side note, I don't know why dell doesnt provide a service where we can go to a webpage and enter our kace1000 address and let them deliver us a kace client with this info embedded.
Untitled 5.sh: line 1: tell: command not found
Untitled 5.sh: line 2: activate: command not found
Untitled 5.sh: line 3: delay: command not found
Untitled 5.sh: line 4: syntax error near unexpected token `do'
Untitled 5.sh: line 4: `do shell script "sudo /Library/Application\ Support/Dell/KACE/bin/runkbot 1 0"' - See more at: http://www.itninja.com/question/embed-kbox-hostname-in-mac-client-install#sthash.rxggTtyW.dpuf
Comments:
-
Sorry I had to remove my previous post because it is probably best to use dmg for this.
Put the AMPAgent.pkg on a dmg and package it up using packagemaker; put the dmg in /tmp
as a post install script add the following;
____
#!/bin/bash
# Mount DMG
hdiutil attach /tmp/AMPAgent.dmg
# Install Kace Agent
sudo sh -c 'KACE_SERVER=k1000.yourdomain.com installer -pkg /Volumes/AMPAgent.pkg -target /'
# Unmount DMG
hdiutil detach /Volumes/AMPAgent
# Delete AMPAgent.dmg
sudo rm -f /tmp/AMPAgent.dmg
# Run Checkin
/Library/Application\ Support/Dell/KACE/bin/runkbot 1 0
exit 0
___
Essentially this will install the agent with your k1000 server address and do an inventory checkin.
Make sure your post install script is executable or it wont work. (chmod +x /path/to/yourscript.sh - rickreilly 10 years ago-
what is the difference between runkbot 1 0 and runkbot 2 0 ? - gpalau 10 years ago
-
1 does bootstrap
2 runs client and checks for agent updates
3 scripts
4 inventory
5 install agent updates only
6 runs managed installs - rickreilly 10 years ago
-
Vote this up, so maybe they will add some support for to pre-configure the agent installer:
https://kace.uservoice.com/forums/82699-k1000/suggestions/4035615-allow-mac-agent-installer-to-have-preconfigured-se - erush 10 years ago
I made an article on my blog based on the script needed to run this after I finally figured out how to do it: http://www.enterpriseosx.com/kace-1000-agent-mac-silent-installer/
edit: tried to paste my code here but its too long, so use this pastebin link: http://pastebin.com/MTBycuhP or check the article above.
so that the conversation will remain readable.
Untitled 5.sh: line 1: tell: command not found
Untitled 5.sh: line 2: activate: command not found
Untitled 5.sh: line 3: delay: command not found
Untitled 5.sh: line 4: syntax error near unexpected token `do'
Untitled 5.sh: line 4: `do shell script "sudo /Library/Application\ Support/Dell/KACE/bin/runkbot 1 0"' - gpalau 10 years ago