We want to automate the creation of the svn repos and trac environments for new projects. Basically, this would mean creating a web script that got some info (like env and repo name, etc) from the user and then executed
sudo -u svn svnadmin create /var/svn/<projectname> trac-admin /var/trac/sites/<projectname> initenv [... All extra params...]
For the second command, this is simple, as it already runs as the www-data user, so I wouldn't have to use sudo. But for the first command, I'd have to use sudo and add
www-data to the sudoers file. I was wondering if this is a good idea, and how to do it in that case. Reading the manpage has left me with more doubts than certainties about this.
This webserver would only be accessible from our internal network, by the way. The OS is Ubuntu Server 10.04.