From ff8b5180562a90f5f44447c627f86ab60467f55e Mon Sep 17 00:00:00 2001 From: Julian Blake Kongslie Date: Wed, 20 Apr 2011 21:41:14 -0700 Subject: Create .gitconfig for new users. --- pinyadmin/sbin/newuser | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'pinyadmin') diff --git a/pinyadmin/sbin/newuser b/pinyadmin/sbin/newuser index e38e791..ef61cd7 100755 --- a/pinyadmin/sbin/newuser +++ b/pinyadmin/sbin/newuser @@ -5,6 +5,8 @@ use warnings; use Email::Valid::Loose qw( ); +use Piny::User; + my ( $email, $username, $password ); # Configure the strictness of our email checks. @@ -147,6 +149,17 @@ if ( $ret ) { exit 1; }; +my $u = Piny::User->new( $username ); + +open( GITCONFIG, ">", $u->home . "/.gitconfig" ) or die "Could not open .gitconfig for new user: $!\n"; +print GITCONFIG <uid, $u->group->gid, $u->home . "/.gitconfig" ); + print "Your user has been created. Try logging in!\n"; exit 0; -- cgit v1.2.3