Files
teleport/lib/web/scripts/oneoff
Marco Dinis 6b9334c3bd Script oneoff: add optional command prefix (sudo) (#43234)
* Script oneoff: add optional command prefix (sudo)

We are converting the installer script used for Server Auto Discover to
use go instead of shell script.

As an example, in EC2 Auto Discover, the script runs as `ssm-user` which
has access to using `sudo`.

This script is currently using `sudo` to change system wide
configurations (adding repos, installing packages, create file locks,
....).
In order to convert this script into go code, we must also run with
elevated privileges.

This PR changes the `oneoff` script to optionally run with a prefix.
Only `sudo` can be used as a command prefix.

* use t.cleanup and fix sudo usage when testing
2024-06-25 11:17:10 +00:00
..