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

    Ubuntu unable to edit command.json (gets overwritten)

    Scheduled Pinned Locked Moved General Discussion
    3 Posts 2 Posters 786 Views 1 Watching
    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 Offline
      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 Offline
        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 Offline
          rktdno
          last edited by

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

          1 Reply Last reply Reply Quote 0

          Hello! It looks like you're interested in this conversation, but you don't have an account yet.

          Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

          With your input, this post could be even better 💗

          Register Login
          • First post
            Last post