<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[triggercmdagent and tcmd are not recognizing changes to commands.json]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">I've got the tcmd cli tool installed, and I tried installing triggercmdagent (headless, both foreground app and daemon), and either way, it doesn't seem to recognize when I edit the /root/.TRIGGERcmdData/commands.json file. When I run "tcmd --list", it only shows the "Gnome Editor" command that comes by default, and none of the ones I added. I even removed the Gnome Editor command and that one still shows up.</p>
<p dir="auto">Restarting triggercmdagent (app or daemon) as well as the machine itself seems to have no effect.</p>
]]></description><link>https://www.triggercmd.com/forum/topic/2853/triggercmdagent-and-tcmd-are-not-recognizing-changes-to-commands-json</link><generator>RSS for Node</generator><lastBuildDate>Tue, 14 Jul 2026 18:48:51 GMT</lastBuildDate><atom:link href="https://www.triggercmd.com/forum/topic/2853.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 17 May 2024 05:06:10 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to triggercmdagent and tcmd are not recognizing changes to commands.json on Wed, 22 May 2024 00:27:58 GMT]]></title><description><![CDATA[<p dir="auto"><a class="mention plugin-mentions-user plugin-mentions-a" href="https://www.triggercmd.com/forum/uid/22937">@DarkGreen92</a>, great.  You're welcome.  Thank you for your patience.</p>
]]></description><link>https://www.triggercmd.com/forum/post/7857</link><guid isPermaLink="true">https://www.triggercmd.com/forum/post/7857</guid><dc:creator><![CDATA[Russ]]></dc:creator><pubDate>Wed, 22 May 2024 00:27:58 GMT</pubDate></item><item><title><![CDATA[Reply to triggercmdagent and tcmd are not recognizing changes to commands.json on Tue, 21 May 2024 22:18:26 GMT]]></title><description><![CDATA[<p dir="auto"><a class="mention plugin-mentions-user plugin-mentions-a" href="https://www.triggercmd.com/forum/uid/1">@Russ</a> That seems to have done it! I think my mistake was mostly running it as a standard user. When I switched to root and ran <code>node agent.js --console</code>, it did prompt me to input the token. After that I was able to restart the service and now when I check status, it always shows as active.</p>
<p dir="auto">Thanks for your help.</p>
]]></description><link>https://www.triggercmd.com/forum/post/7856</link><guid isPermaLink="true">https://www.triggercmd.com/forum/post/7856</guid><dc:creator><![CDATA[DarkGreen92]]></dc:creator><pubDate>Tue, 21 May 2024 22:18:26 GMT</pubDate></item><item><title><![CDATA[Reply to triggercmdagent and tcmd are not recognizing changes to commands.json on Sun, 19 May 2024 12:42:12 GMT]]></title><description><![CDATA[<p dir="auto"><a class="mention plugin-mentions-user plugin-mentions-a" href="https://www.triggercmd.com/forum/uid/22937">@DarkGreen92</a>, I think you could see the error if you run the command the daemon is running:</p>
<pre><code>node /usr/share/triggercmdagent/app/src/daemon.js --run /root/.TRIGGERcmdData
</code></pre>
<p dir="auto">It looks like it's running as root, so you should be root too when. You run that command.</p>
<p dir="auto">I see it's trying to find the agent config in /root/. TRIGGERcmdData so please show me the contents of that.</p>
<p dir="auto">It might just need the token to login.  You can give it that by creating a token.tkn in that folder, or run <strong>node agent.js --console</strong> and it should prompt you for it if it's missing.</p>
]]></description><link>https://www.triggercmd.com/forum/post/7852</link><guid isPermaLink="true">https://www.triggercmd.com/forum/post/7852</guid><dc:creator><![CDATA[Russ]]></dc:creator><pubDate>Sun, 19 May 2024 12:42:12 GMT</pubDate></item><item><title><![CDATA[Reply to triggercmdagent and tcmd are not recognizing changes to commands.json on Sat, 18 May 2024 21:26:56 GMT]]></title><description><![CDATA[<p dir="auto"><a class="mention plugin-mentions-user plugin-mentions-a" href="https://www.triggercmd.com/forum/uid/1">@Russ</a> Sorry I didn't specify. I'm running Debian headless inside Proxmox. I think the problem might actually be that the service is repeatedly crashing after start up. When I run <code>doas systemctl status triggercmdagent</code> I get this:</p>
<pre><code>× triggercmdagent.service - TRIGGERcmd Agent
     Loaded: loaded (/etc/systemd/system/triggercmdagent.service; enabled; preset: enabled)
     Active: failed (Result: start-limit-hit) since Sat 2024-05-18 17:05:02 EDT; 7min ago
   Duration: 389ms
    Process: 2757 ExecStart=/usr/bin/env node /usr/share/triggercmdagent/app/src/daemon.js --run /root/.TRIGGERcmdData (code=exited, status=0/SUCCESS)
   Main PID: 2757 (code=exited, status=0/SUCCESS)
        CPU: 385ms

May 18 17:05:02 core-services systemd[1]: triggercmdagent.service: Deactivated successfully.
May 18 17:05:02 core-services systemd[1]: triggercmdagent.service: Scheduled restart job, restart counter is at 6.
May 18 17:05:02 core-services systemd[1]: Stopped triggercmdagent.service - TRIGGERcmd Agent.
May 18 17:05:02 core-services systemd[1]: triggercmdagent.service: Start request repeated too quickly.
May 18 17:05:02 core-services systemd[1]: triggercmdagent.service: Failed with result 'start-limit-hit'.
May 18 17:05:02 core-services systemd[1]: Failed to start triggercmdagent.service - TRIGGERcmd Agent.
</code></pre>
<p dir="auto">Running</p>
<pre><code>doas systemctl reset-failed triggercmdagent
doas systemctl start triggercmdagent
doas systemctl status triggercmdagent
</code></pre>
<p dir="auto">gives me what I think is the expected output at first:</p>
<pre><code>● triggercmdagent.service - TRIGGERcmd Agent
     Loaded: loaded (/etc/systemd/system/triggercmdagent.service; enabled; preset: enabled)
     Active: active (running) since Sat 2024-05-18 17:17:22 EDT; 113ms ago
   Main PID: 2860 (node)
      Tasks: 7 (limit: 2307)
     Memory: 15.7M
        CPU: 102ms
     CGroup: /system.slice/triggercmdagent.service
             └─2860 node /usr/share/triggercmdagent/app/src/daemon.js --run /root/.TRIGGERcmdData

</code></pre>
<p dir="auto">But then checking status again right after gives me this again:</p>
<pre><code>× triggercmdagent.service - TRIGGERcmd Agent
     Loaded: loaded (/etc/systemd/system/triggercmdagent.service; enabled; preset: enabled)
     Active: failed (Result: start-limit-hit) since Sat 2024-05-18 17:17:23 EDT; 2s ago
   Duration: 406ms
    Process: 2860 ExecStart=/usr/bin/env node /usr/share/triggercmdagent/app/src/daemon.js --run /root/.TRIGGERcmdData (code=exited, status=0/SUCCESS)
   Main PID: 2860 (code=exited, status=0/SUCCESS)
        CPU: 388ms

May 18 17:17:22 core-services systemd[1]: triggercmdagent.service: Deactivated successfully.
May 18 17:17:23 core-services systemd[1]: triggercmdagent.service: Scheduled restart job, restart counter is at 5.
May 18 17:17:23 core-services systemd[1]: Stopped triggercmdagent.service - TRIGGERcmd Agent.
May 18 17:17:23 core-services systemd[1]: triggercmdagent.service: Start request repeated too quickly.
May 18 17:17:23 core-services systemd[1]: triggercmdagent.service: Failed with result 'start-limit-hit'.
May 18 17:17:23 core-services systemd[1]: Failed to start triggercmdagent.service - TRIGGERcmd Agent.
</code></pre>
<p dir="auto">Do you have any advice on how to fix the crashes?</p>
]]></description><link>https://www.triggercmd.com/forum/post/7851</link><guid isPermaLink="true">https://www.triggercmd.com/forum/post/7851</guid><dc:creator><![CDATA[DarkGreen92]]></dc:creator><pubDate>Sat, 18 May 2024 21:26:56 GMT</pubDate></item><item><title><![CDATA[Reply to triggercmdagent and tcmd are not recognizing changes to commands.json on Fri, 17 May 2024 13:13:53 GMT]]></title><description><![CDATA[<p dir="auto"><a class="mention plugin-mentions-user plugin-mentions-a" href="https://www.triggercmd.com/forum/uid/22937">@DarkGreen92</a>, I'm glad you asked instead of giving up.  I don't know what you OS is, but I think it's Linux and not Raspberri Pi.</p>
<p dir="auto">I think the commands.json file that your background agent daemon is using is the one in your user's home folder at /home/(your user)/.TRIGGERcmdData/commands.json, not root's home folder.</p>
<p dir="auto">Also, the background agent will only process (add/remove/run) your background commands in the commands.json file, not the foreground commands like Gnome Editor.</p>
<p dir="auto">When you use <strong>tcmd --list</strong>, you're listing the commands in your account, not the local commands in your commands.json file.  I think it's only listing Gnome Editor because that command got added to your account when you ran the foreground agent once, and entered your token to log it in.</p>
<p dir="auto">You could also try running this command to show you which .TRIGGERcmdData folder the daemon is using:</p>
<pre><code>systemctl status triggercmdagent
</code></pre>
<p dir="auto">There's my output from my Raspberry Pi.  It's using the one in /root because that's what the Raspberry Pi agent uses by default.  I think you'll see your non-rpi Linux agent using /home/(your user)/.TRIGGERcmdData.</p>
<pre><code>pi@garagepi:~ $ systemctl status triggercmdagent
● triggercmdagent.service - TRIGGERcmd Agent
   Loaded: loaded (/etc/systemd/system/triggercmdagent.service; enabled; vendor preset: enabled)
   Active: active (running) since Thu 2023-07-13 03:17:03 UTC; 10 months 5 days ago
 Main PID: 262 (node)
   CGroup: /system.slice/triggercmdagent.service
           └─262 node /usr/share/triggercmdagent/app/src/daemon.js --run /root/.TRIGGERcmdData
</code></pre>
]]></description><link>https://www.triggercmd.com/forum/post/7849</link><guid isPermaLink="true">https://www.triggercmd.com/forum/post/7849</guid><dc:creator><![CDATA[Russ]]></dc:creator><pubDate>Fri, 17 May 2024 13:13:53 GMT</pubDate></item></channel></rss>