awslabs / amazon-kinesis-agent

Continuously monitors a set of log files and sends new data to the Amazon Kinesis Stream and Amazon Kinesis Firehose in near-real-time.
Other
352 stars 218 forks source link

Allow ./setup --build as non-root #232

Open TheHinsh opened 2 years ago

TheHinsh commented 2 years ago

For cross compiling, it would be helpful to be able to run ./setup --build as a non-root user.

Right now, there is this code:

# Make sure only root can run our script
if [ "$(id -u)" != "0" ]; then
 echo "This script must be run as root" >&2
 exit 1
fi

that ensures that the aws-kinesis-agent install/uninstall are not performed by a non-root user. However, it really doesn't apply to the --build option