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

Questions on TCMD tool and usage?

General Discussion
2
12
708
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.
  • R
    Russ @tuicemen
    last edited by Russ Jan 27, 2022, 11:48 PM Jan 27, 2022, 11:45 PM

    @tuicemen, it doesn't have to be in any particular folder.

    You're missing the computer name in your commands. Here's an example of it working:

    tcmd -c russfam -t calculator
    {"message":"Trigger sent."}
    

    You can also run this to use --list to show a list of tcmd commands - one for each of your TRIGGERcmd commands on each of your computers.

    tcmd -list
    0 tcmd --computer "bedroompi" --trigger "apt update"
    1 tcmd --computer "bedroompi" --trigger "Bedroom" --params "(your parameters)"
    

    Or use --help to show help:

    C:\Users\russe\.TRIGGERcmdData>tcmd -h
    NAME:
        tcmd - Run commands on computers in your TRIGGERcmd account
      USAGE:
        tcmd [options]
    
      OPTIONS:
        --trigger value, -t value   Trigger name of the command you want to run
        --computer value, -c value  Name of the computer (leave blank for your default computer)
        --params value, -p value    Any parameters you want to add to the remote command
        --list, -l                  List your commands
        --help, -h                  show help
        --version, -v               print the version
    

    FYI, it logs in using the ~/.TRIGGERcmdData/token.tkn or C:\Users\(user)\.TRIGGERcmdData\token.tkn file depending on the OS. That token.tkn file gets written when you install the TRIGGERcmd agent.

    Russell VanderMey

    T 1 Reply Last reply Jan 27, 2022, 11:54 PM Reply Quote 1
    • T
      tuicemen @Russ
      last edited by Jan 27, 2022, 11:54 PM

      @russ directions state -c option can be blank if running from default which I am I'll try adding computer name

      T R 2 Replies Last reply Jan 27, 2022, 11:57 PM Reply Quote 0
      • T
        tuicemen @tuicemen
        last edited by Jan 27, 2022, 11:57 PM

        Yep that did it! thanks

        1 Reply Last reply Reply Quote 0
        • R
          Russ @tuicemen
          last edited by Russ Jan 28, 2022, 2:37 AM Jan 28, 2022, 2:10 AM

          @tuicemen said in Questions on TMCD tool and usage?:

          @russ directions state -c option can be blank if running from default which I am I'll try adding computer name

          You're right, that should work. Thanks for pointing that out. I need to fix that.

          EDIT: Fixed - now if you don't specify the computer it will run on your default computer.

          Russell VanderMey

          T 2 Replies Last reply Jan 28, 2022, 2:43 PM Reply Quote 0
          • T
            tuicemen @Russ
            last edited by Jan 28, 2022, 2:43 PM

            @russ, thanks I'll update the tool.

            1 Reply Last reply Reply Quote 0
            • T
              tuicemen @Russ
              last edited by Jan 28, 2022, 5:19 PM

              @russ I updated the tool, option -v states: tcmd version 1.0.5
              Can't remember what it was previously but I still have to input the computer name.
              Maybe the issue is only for the tcmd-linux-arm file.

              R 1 Reply Last reply Jan 28, 2022, 9:47 PM Reply Quote 0
              • R
                Russ @tuicemen
                last edited by Russ Jan 28, 2022, 9:49 PM Jan 28, 2022, 9:47 PM

                @tuicemen, I actually fixed it on the server side in this case. I found that it even worked on version 1.0.3

                tcmd  -t calculator
                {"message":"Trigger sent."}
                tcmd -v
                tcmd version 1.0.3
                

                I upgraded to 1.0.5 and it still works:

                tcmd -v
                tcmd version 1.0.5
                tcmd  -t calculator
                {"message":"Trigger sent."}
                

                Russell VanderMey

                T 1 Reply Last reply Jan 28, 2022, 10:57 PM Reply Quote 0
                • T
                  tuicemen @Russ
                  last edited by Jan 28, 2022, 10:57 PM

                  @russ yep your right it works, guess my fat fingers got in the way.
                  Sorry about that.

                  R 1 Reply Last reply Jan 29, 2022, 3:24 PM Reply Quote 0
                  • R
                    Russ @tuicemen
                    last edited by Jan 29, 2022, 3:24 PM

                    @tuicemen, nice, no problem. I'm glad it works.

                    Isn't that a nice way to trigger your command from a command? I think it's easier than using curl.

                    Russell VanderMey

                    T 1 Reply Last reply Jan 29, 2022, 3:34 PM Reply Quote 0
                    • T
                      tuicemen @Russ
                      last edited by Jan 29, 2022, 3:34 PM

                      @russ Ya it is so simple to use. I like the list option for showing trigger names. My memory isn't what it use to be and my spelling never was the greatest!

                      1 Reply Last reply Reply Quote 0
                      12 out of 12
                      • First post
                        12/12
                        Last post