microsoft / vso-agent

Visual Studio Team Services and TFS agent for Mac OSX and Linux
MIT License
131 stars 56 forks source link

svc script needs an option to set the user #326

Closed gwlperl closed 6 years ago

gwlperl commented 6 years ago

The svc script installs a systemd service for the agent, so it must be run as root or sudo. It cleverly finds the user and inserts that into the systemd run config. However, we don't want the user that's going to run the script to have sudo. So we either have to edit the systemd config after the fact or grant sudo to the user to run ./svc isntall then revoke the sudo privs. Either way makes automation of agent creation "problematic". A simple option of -u user would end this problem.

Also, self modifying bash scripts considered harmful.

bryanmacfarlane commented 6 years ago

Deprecated. Replacement is here: https://github.com/Microsoft/vsts-agent