diff options
-rw-r--r-- | libpiny/lib/Piny/Repo.pm | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libpiny/lib/Piny/Repo.pm b/libpiny/lib/Piny/Repo.pm index a4b1890..9796d9f 100644 --- a/libpiny/lib/Piny/Repo.pm +++ b/libpiny/lib/Piny/Repo.pm @@ -310,6 +310,8 @@ sub rebuild_git { sub rebuild_ikiwiki { my ( $s ) = @_; + chdir( "/srv/git" ); # because git likes to chdir back to its original cwd for some dumb reason, which isn't guaranteed to work. + unless( getpwnam("iki-" . $s->shortname ) ) { system( "/usr/sbin/adduser", "--quiet", "--system", "--group", "--gecos", $s->shortname, "iki-" . $s->shortname ) and die "Could not create ikiwiki user!"; system( "/usr/sbin/adduser", "--quiet", "iki-" . $s->shortname, "git-" . $s->shortname ) and die "Could not add ikiwiki user to the repo group!"; |