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.

질문됨 일 년 전713회 조회
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
답변함 일 년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인