NXLogs install
Hi All!
I'm trying to install NXLogs with a specific config file (.conf). After the install I need to restart the service for the new config to take effect. NXLog is in the software catalog but I'm not sure how to force it to overwrite the default config.
Maybe a script would be better. Zip the msi and the .conf and run the batch file to restart the service after. It seems doable but I don't have much experience with Kace to implement this.
Answers (3)
Go to Distribution |Task Chains to combine the tasks.
Build your deployment (and for specific questions it may be useful to ask how to install via Command line the software with your needs) and a restart task and put both into the task chain.
Comments:
-
Thanks for the quick reply Nico.
I'm not really following. Can you expend on this please? - mr.mister 4 years ago -
I think I understand. I can create a task to restart a service and task it after the install.
As far as the install, how would I force the overwrite of a file in a directory with the one that I want? - mr.mister 4 years ago-
there are multiple ways, a good idea may be (as I said: I dont know the software)
1. you create an installation as a managed install
2. you create a file sync or a script which copies the files to the location you want
3. you create a script which restarts the service
you put them all in the Task chain so they are running one after the other. - Nico_K 4 years ago-
OK. How would I copy the file. I don't want to put in on share for the script to pickup. I want the file to be copied from a Kace directory. Are there variables to specify it.
e.g. a bat file with something like this:
copy /z /y “$KaceVar\nxlog.conf" "C:\Program Files (x86)\nxlog\conf" - mr.mister 4 years ago -
yes, you can find all usable variables if you click to the mario blocks (the blue boxes with the question marks) - Nico_K 4 years ago
-
I'm having a problem with the script. The scripts runs successfully. I can see everything is being copied but the file never gets overwritten.
in online shell with .bat
start /wait xcopy /Y $(KACE_DEPENDENCY_DIR)\nxlog.conf "C:\Program Files (x86)\nxlog\conf\"
net stop nxlog
net start nxlog
I tried with "" and without. No luck - mr.mister 4 years ago
For just copying a file to an end point, you can use the "File Sync" feature of the SMA.
More information can be found in the Admin guide.
Hello,
For this installation i created 3 scripts:
1- Script to install the agent (i used the msi configuration)
2a - script to overwrite the nxlog.conf file (zipped the file/ attached it and the script unzips the file and places it C:\program.........) (((this conf is for DC servers)))
2b - script to overwrite the nxlog.conf file (zipped the file/ attached it and the script unzips the file and places it C:\program.........) (((this conf is for IIS servers)))
3- Start & Restart service (nxlog) (script to start service also to restart it/ just in case :) )
Once those 3 scripts were tested, i created a task Chain
1- task chain to run 1, 2a, 3
2- task chain to run 1, 2b, 3
Example of Step 1:
Example of step 2a
Dependencies Tasks (required)Example of Step 3: