Run commands in greengrass component as sudo

0

How do I run commands which need to be run as the sudo user on AWS Greengrass V2 ?

Excerpt from the component recipe below:

    Lifecycle:
      Run:   
        Script: "sudo jetson_clocks"
        RequiresPrivelege: true

but this still doesn't work.

已提问 1 年前741 查看次数
1 回答
1

Hello!

Please use RequiresPrivilege (the spelling is slightly different than in the provided snippet). Also, when using RequiresPrivilege, sudo isn't needed in the Script, since the command will run as root.

Lifecycle:
      Run:   
        Script: "jetson_clocks"
        RequiresPrivilege: true
AWS
已回答 1 年前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则