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.

posta un anno fa741 visualizzazioni
1 Risposta
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
con risposta un anno fa

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande