Is there a way to use this on a headless CentOS server?
-
I would like to use this on a headless CentOS server, but there is only a .deb file for this and not an .rpm.
Is there anything I could do?
Thanks.
-
@eggbean, I'm glad you asked. These instructions will install the background agent running as a systemd daemon:
Login as root with sudo su - and run these commands:
wget https://s3.amazonaws.com/triggercmdagents/triggercmdagent-1.0.1.x86_64.rpm yum reinstall ./triggercmdagent-1.0.1.x86_64.rpm node /usr/share/triggercmdagent/resources/app/src/agent.js --console (Enter your token) (Press CTRL-C to exit the foreground agent) sh /usr/share/triggercmdagent/resources/app/src/installdaemon.sh systemctl status triggercmdagent
Edit your /root/.TRIGGERcmdData/commands.json file to add background commands.
I just tested this on my CentOS 7.5 server.
-
Thanks. This is working for me as far as inputting the API token, as I have forgotten where it is. I remember seeing it earlier. Where is it again?
-
@eggbean, the token is on the Instructions page and your Profile page.
-
Thanks. I was looking around in the forum for some reason.
Still feeling a bit lost here, possibly because I'm not using the GUI. I have been looking, but how do I make new triggers now (and delete some default triggers)? I would like to run some bash scripts by asking Alexa.
Also, I do not seem to be getting reply notifications from this forum. I think I have everything set correctly and this conversation is set as Watched.
-
@eggbean, I turned off emails from the forum because I was getting a lot of spammers. Since then they've stopped posting, so I'll turn it back on.
To add/remove commands, edit your /root/.TRIGGERcmdData/commands.json file. Make sure you make them background commands because you're running the background agent.
The background agent adds, removes, and runs background commands.
FYI, if you find that your commands.json keeps reverting as soon as you save it, that means you've made some mistake in the json formatting so the agent restored the last good version of it.