TRIGGERcmd
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Ubuntu unable to edit command.json (gets overwritten)

    General Discussion
    2
    3
    231
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • R
      rktdno
      last edited by

      I'm running Ubuntu 16.04 and trying to edit the command.json file. If I do and triggercmd is running (it's a headless server, triggercmd runs as a service) the edits don't persist. If I stop the service and edit the file it's fine, until I start the triggercmd service again and then it changes the file to what it was prior to the edit.

      Any help would be appreciated, I can't figure out how to get any changes to persist.

      RussR 1 Reply Last reply Reply Quote 0
      • RussR
        Russ @rktdno
        last edited by

        @rktdno, the agent keeps a backup of the commands.json file, and whenever it finds invalid json in the commands.json file, it restores the backup.

        You could copy/paste your json into an online json parser like this one to check your syntax:
        https://jsonformatter.org/json-parser

        Sometimes it's just a comma at the end of the last entry, or maybe you're not escaping some quotes in a command.

        Russell VanderMey

        1 Reply Last reply Reply Quote 0
        • R
          rktdno
          last edited by

          @Russ Thanks for that. Indeed, beaten by the comma. Thanks for the help.

          1 Reply Last reply Reply Quote 0
          • First post
            Last post