Kaseya Community

Writing < > out to a text file

This question is not answered
Hi All smart people in the forums, This has been buggering we for weeks and have only just got back to looking into this. We are trying to write a script to rollout apache configs to a server when we take in a new company about 1 per week. We are using a linux environment for the webservers and our support team is not upto using putty and adding the script and restarting it the service and the less that is touched the less that seems to break. The only issue is that the line that is writing the file is creating an error: echo "" > #global:kworking#/#global:domainname# will now work as it thinks that "VirtualHost *:80" is a variable. We have tried writing the file Command in the file Building the file and moving it Any clues or is it just taken that we shouldn't be writing xml out via kaseya?? Open to all solutions and moving to IIS is not an answer. Regards, Darryl Roberts IT Manager White Retail Group
All Replies
  • maybe you should post your code

    just looking at this line echo "" > #global:kworking#/#global:domainname# it's missing the final ""  but really we would need your code to really help

    does "echo" even work on linix ?

  • yes echo is a linux command too!  

    might be better off creating a bash script to create the file for you.  Then adding the bash script to managed files, then use

    Writefile to upload the file to the client then execute said shell script.

    For the life of me I cant see why echo "" > #...# would fail thats just creating a blank line in the file referenced by #global:kworking#/#global:domainname# do those globals exist?

  • In Kaseya you need to use double >'s

    i.e.

    echo "" >> #...#   will overwrite the text inthe output file

    echo "" >>>> #...#  will append the text tot he file