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.

demandé il y a un an741 vues
1 réponse
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
répondu il y a un an

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions