summaryrefslogtreecommitdiff
path: root/pinyadmin/sbin/newrepo
diff options
context:
space:
mode:
Diffstat (limited to 'pinyadmin/sbin/newrepo')
-rwxr-xr-xpinyadmin/sbin/newrepo17
1 files changed, 17 insertions, 0 deletions
diff --git a/pinyadmin/sbin/newrepo b/pinyadmin/sbin/newrepo
index 5df6ee5..a63d96a 100755
--- a/pinyadmin/sbin/newrepo
+++ b/pinyadmin/sbin/newrepo
@@ -44,6 +44,23 @@ while( 1 ) {
};
+my $config = Piny::Config->new( );
+my $dest = $config->piny_newuseremail;
+
+unless( open( MAIL, "|/usr/lib/sendmail -t" ) ) {
+ die "Couldn't execute sendmail: $!\n";
+};
+print MAIL <<END;
+To: $dest
+Subject: Creating piny repo $name
+Content-type: text/plain; charset=us-ascii
+
+A new piny repo ``$name'' has been created.
+
+Description: $description
+END
+close( MAIL );
+
my $repo = Piny::Repo->create( $name, $description );
print "Repo URL: " . $repo->ikiwiki_url . "\n";