${$::{$_}} = $ENV{"USERV_U_$_"}
for grep s|^USERV_U_([a-z_]+)$|$1|, keys %ENV;
-our ($client,$service,$path,$host);
+our ($client,$service,$path,$host,@opts);
openlog "userv-$service", 'pid', 'daemon';
sub fail { syslog 'err', "$client @_"; exit }
fail "$! $path" unless -e $path;
syslog 'notice', "$client $dir";
-my @cmd = ($service, '--strict', '--timeout=30', $dir);
+@opts = qw( --strict --timeout-30 )
+ if @opts == 0 and $service eq 'git-upload-pack';
+
+my @cmd = ($service =~ m|^(git)-(.*)$|, @opts, $dir);
no warnings; # suppress errors to stderr
exec @cmd or fail "exec $service: $!";