Make a rule that runs a command in console

Hey, i want to make a rule that when i run it, it will send sudo hb-service restart
i don’t see the option in the UI to add that.

Look at executeCommandLine()

how do i add that from UI?

You’d type it in as part of the action script of your rule. First check what script language you are using, for the exact syntax of the command.

i have these languages

Choice of three languages, but I don’t think Blockly would be suitable for this job, so that does leave two choices for you.

I’m not doing this for you. You are at the “how do I create a rule” stage, so you might want to play around with that first, tutorials etc.

When you do get to executing a command line, that is a fairly technical job for a newcomer, don’t expect it to be easy - you may have to sort out file permissions and so on. There are many examples in this forum. Also note that your command will not be running in console context.

ok, thanks