Trigeercmdagent start, but it does not work
- 
					
					
					
					
 Hi, I've installed triggercmdagent, it is start without any erros, but it is not working. Bellow, the 'systemctl status triggercmdagent' ● triggercmdagent.service - TRIGGERcmd Agent 
 Loaded: loaded (/etc/systemd/system/triggercmdagent.service; enabled; vendor preset: enabled)
 Active: active (running) since Fri 2021-10-15 09:59:56 -03; 7s ago
 Main PID: 1996 (node)
 Tasks: 11 (limit: 4435)
 CGroup: /system.slice/triggercmdagent.service
 └─1996 node /usr/share/triggercmdagent/app/src/daemon.js --run /root/.TRIGGERcmdDataOct 15 09:59:58 ubuntu env[1996]: Logging in with saved token to run background tasks. 
 Oct 15 09:59:58 ubuntu env[1996]: Write backup completed.
 Oct 15 09:59:59 ubuntu env[1996]: |> Now connected to https://www.triggercmd.com.
 Oct 15 09:59:59 ubuntu env[1996]: ___/ For help, see: http://bit.ly/2q0QDpf
 Oct 15 09:59:59 ubuntu env[1996]: (using sails.io.js node SDK @v1.1.13)
 Oct 15 09:59:59 ubuntu env[1996]: Connected at: Fri Oct 15 2021 09:59:59 GMT-0300 (Brasilia Standard Time)
 Oct 15 09:59:59 ubuntu env[1996]: Initiated command removals
 Oct 15 09:59:59 ubuntu env[1996]: Initiated command adds
 Oct 15 09:59:59 ubuntu env[1996]: { message: 'Subscribed to 61697726d340a9001b5131be!' }
 Oct 15 09:59:59 ubuntu env[1996]: { message: 'Subscribed to 61697726d340a9001b5131be!' }I've noticed that, when I create a new command, in commands.json file and restart the service, it does not sync with the triggercmd site, but when I start the triggercmd with the --console option, just like that: node /usr/share/triggercmdagent/app/src/agent.js --console Everything works properly and the new command syncs with the site. What I must do to fix this? Tks. 
- 
					
					
					
					
 I've fixed the problem, but not in elegant way. 
 I've changed triggercmdagent service systemd file located in: /etc/systemd/system/triggercmdagent.serviceFrom this: 
 ExecStart=/usr/bin/env node /usr/share/triggercmdagent/app/src/daemon.js --run /root/.TRIGGERcmdDataTo this: 
 ExecStart=/usr/bin/env node /usr/share/triggercmdagent/app/src/agent.js --console >/dev/null 2>/dev/null &From now on, it is working good. If someone has the reight solution for this problem, I'd like to know. Tks 
- 
					
					
					
					
 @Wesley-Galdino-de-Farias, I think I know what the problem was. I think your commands had "ground": "foreground" but you were running the background service which only cares about commands with "ground": "background". When you updated your /etc/systemd/system/triggercmdagent.service file you changed it to run in foreground mode. 
- 
					
					
					
					
 Thanks for your reply, and I'm sorry for the huge delay to reply you. 
 You are totally right I was made this 'ground' mistake.Thanks 
- 
					
					
					
					
 @Wesley-Galdino-de-Farias, good. That's a common problem. I'm glad you figured it out. 
