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

    New user on latest Raspberry Pi help please!

    Scheduled Pinned Locked Moved Raspberry Pi
    4 Posts 2 Posters 990 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.
    • Al S.A Offline
      Al S.
      last edited by

      All right, so I followed all the commands in the tutorial and triggercmd and background service installed fine.
      Computer is added to my computers on triggercmd.com and all 4 sample triggers show up. However when I edit the commands.json file, the changes don't get uploaded. I added commands and also tried to delete the Gnome editor command, but on the website it just shows the original 4 commands.
      I ran sudo systemctl stop triggercmdagent and then start, but they still remain the same.

      This is the output of status:

      triggercmdagent.service - TRIGGERcmd Agent
           Loaded: loaded (/etc/systemd/system/triggercmdagent.service; enabled; pres>
           Active: active (running) since Tue 2024-12-03 20:48:17 GMT; 6s ago
         Main PID: 10763 (node)
            Tasks: 11 (limit: 9559)
              CPU: 625ms
           CGroup: /system.slice/triggercmdagent.service
                   └─10763 node /usr/share/triggercmdagent/app/src/daemon.js --run /r>
      
      Dec 03 20:48:18 raspberrypi env[10763]: (Use `node --trace-warnings ...` to sho>
      Dec 03 20:48:18 raspberrypi env[10763]: Write backup completed.
      Dec 03 20:48:18 raspberrypi env[10763]:   |>    Now connected to https://www.tr>
      Dec 03 20:48:18 raspberrypi env[10763]: \___/   For help, see: http://bit.ly/2q>
      Dec 03 20:48:18 raspberrypi env[10763]:         (using sails.io.js node SDK @v1>
      Dec 03 20:48:18 raspberrypi env[10763]:          Connected at: Tue Dec 03 2024 >
      Dec 03 20:48:18 raspberrypi env[10763]: Initiated command adds
      Dec 03 20:48:18 raspberrypi env[10763]: Initiated command removals
      Dec 03 20:48:18 raspberrypi env[10763]: { message: 'Subscribed to 674f68f42b0c5>
      Dec 03 20:48:18 raspberrypi env[10763]: { message: 'Subscribed to 674f68f42b0c5>
      
      

      This is the content of my commands.json file

      [
        {"trigger":"Reboot","command":"shutdown -r","ground":"background","voice":"reboot","allowParams": "false"},
        {"trigger":"yum update","command":"yum -y update","ground":"background","voice":"yum update","allowParams": "false"},
        {"trigger":"apt update","command":"apt-get -y update","ground":"background","voice":"update","allowParams": "false"},
        {"trigger":"unmount","command":"umount /media/xexets/*","ground":"background","voice":"unmount","allowParams": "false"}
      ]
      
      

      Am I missing something?

      Thank you!

      RussR 1 Reply Last reply Reply Quote 0
      • RussR Offline
        Russ @Al S.
        last edited by Russ

        @Al-S, when you install the background agent on Raspberry Pi it runs as root, so it uses your /root/.TRIGGERcmdData/commands.json file. Is that what you're showing there? Or is that one from your /home/pi/.TRIGGERcmdData directory?

        Just checking, because if you ran triggercmdagent while logged in as your pi user, you'll also have that /home/pi/.TRIGGERcmdData directory which the background agent does not use.

        It got cut off in the text you pasted, but it will show the .TRIGGERcmdData folder it's using in the systemctl output. Mine looks like this:

         Main PID: 289 (node)
           CGroup: /system.slice/triggercmdagent.service
                   └─289 node /usr/share/triggercmdagent/app/src/daemon.js --run /root/.TRIGGERcmdData
        

        Russell VanderMey

        Al S.A 1 Reply Last reply Reply Quote 0
        • Al S.A Offline
          Al S. @Russ
          last edited by

          @Russ Ah yes absolutely! Sorry, that's the one. It's because I was unable to access the root folder, so I just assumed it was the other folder. I sudo nanoed it and now it appears instantly many thank you so much

          RussR 1 Reply Last reply Reply Quote 0
          • RussR Offline
            Russ @Al S.
            last edited by

            @Al-S, great. Glad that was it.

            Russell VanderMey

            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