diff -r 6426cf731f25 -r 8934ba3404bc cgi-bin/ius-dav-htuseradd.cgi --- a/cgi-bin/ius-dav-htuseradd.cgi Fri Jul 15 14:03:55 2011 +0200 +++ b/cgi-bin/ius-dav-htuseradd.cgi Fri Jul 15 14:10:40 2011 +0200 @@ -27,39 +27,38 @@ my $q = new CGI; - print $q->header(-charset => 'UTF-8'); - print $q->start_html( - -title => $0, - -bgcolor => "white", - ); +print $q->header( -charset => 'UTF-8' ); +print $q->start_html( + -title => $0, + -bgcolor => "white", +); - my ($user, $pass, $expiry) = ( - $q->param('user'), - $q->param('pass'), - $q->param('expiry') - ); +my ( $user, $pass, $expiry ) = + ( $q->param('user'), $q->param('pass'), $q->param('expiry') ); - unless (defined $user or defined $pass or defined $expiry) { +unless ( defined $user or defined $pass or defined $expiry ) { - print $q->start_form, - 'New User' => $q->textfield('user'), - 'Password' => $q->password_field('pass'), - 'Expiry' => $q->textfield('expiry'), - $q->submit, - $q->end_form; + print $q->start_form, + 'New User' => $q->textfield('user'), + 'Password' => $q->password_field('pass'), + 'Expiry' => $q->textfield('expiry'), + $q->submit, + $q->end_form; - } else { +} +else { - my @cmd = (qw(sudo ius-dav-htuseradd -u), $user); - push @cmd, '-e', $expiry if defined $expiry and $expiry ne ''; + my @cmd = ( qw(sudo ius-dav-htuseradd -u), $user ); + push @cmd, '-e', $expiry if defined $expiry and $expiry ne ''; - if (my $pass = qx(@cmd)) { - chomp $pass; - print $q->p($pass); - } else { - print $q->p('Something went wrong'); - } - + if ( my $pass = qx(@cmd) ) { + chomp $pass; + print $q->p($pass); + } + else { + print $q->p('Something went wrong'); } - print $q->end_html; +} + +print $q->end_html;