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

    New user on latest Raspberry Pi help please!

    Raspberry Pi
    2
    4
    118
    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
      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
        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
          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
            Russ @Al S.
            last edited by

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

            Russell VanderMey

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