diff options
-rw-r--r-- | libpiny/lib/Piny/Repo.pm | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/libpiny/lib/Piny/Repo.pm b/libpiny/lib/Piny/Repo.pm index dc4e5c1..25bd744 100644 --- a/libpiny/lib/Piny/Repo.pm +++ b/libpiny/lib/Piny/Repo.pm @@ -376,13 +376,13 @@ sub create { mkdir( $repo->path ) or die "The repo $name appears to already exist! ($!)"; - system( "/usr/sbin/adduser", "--quiet", "--system", "--group", "--gecos", $name, "iki-$repo->shortname" ) and die "Could not create ikiwiki user!"; + system( "/usr/sbin/adduser", "--quiet", "--system", "--group", "--gecos", $name, "iki-" . $repo->shortname ) and die "Could not create ikiwiki user!"; + + my $ikiuser = Piny::User::IkiWiki->new( "name" => "iki-" . $repo->shortname ); - my $ikiuser = Piny::User::IkiWiki->new( "name" => "iki-$repo->shortname" ); + system( "/usr/sbin/addgroup", "--quiet", "git-" . $repo->shortname ) and die "Could not create repo group!"; - system( "/usr/sbin/addgroup", "--quiet", "git-$repo->shortname" ) and die "Could not create repo group!"; - - my $group = Piny::Group->new( "name" => "git-$repo->shortname" ); + my $group = Piny::Group->new( "name" => "git-" . $repo->shortname ); system( "/usr/sbin/adduser", "--quiet", $user->name, $group->name ) and die "Could not add you to the repo group!"; system( "/usr/sbin/adduser", "--quiet", $ikiuser->name, $group->name ) and die "Could not add ikiwiki user to the repo group!"; |