From 24eba0ccdfdfd89609a3119ddcabc83cef3fd3c9 Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Fri, 18 Nov 2011 19:28:47 +0100 Subject: Improved wording in INSTALL file --- INSTALL | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/INSTALL b/INSTALL index cfbaa4d..3ea5a05 100644 --- a/INSTALL +++ b/INSTALL @@ -1,4 +1,4 @@ -You need several cpan modules to use these scripts. +You need several CPAN modules to use these scripts. If you use Debian GNU/Linux, you can install them like so: @@ -6,3 +6,5 @@ sudo aptitude install -R libdatetime-format-mysql-perl libdatetime-perl \ libdbix-class-perl libemail-valid-perl libfile-slurp-perl libio-prompt-perl \ libmime-base64-perl libmime-lite-perl libstring-mkpasswd-perl \ libtemplate-perl libyaml-syck-perl + +This will most probably work for Ubuntu as well. -- cgit v1.2.3 From 1b0a0969361eb294bd98c5cdfabb9e667077fbf4 Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Fri, 18 Nov 2011 19:29:20 +0100 Subject: Add admin_email to default.yml --- default.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/default.yml b/default.yml index f7eaad3..5df20cb 100644 --- a/default.yml +++ b/default.yml @@ -1,3 +1,4 @@ # default.yml -- defaults for fripost administrative scripts --- dbi_dsn: dbi:mysql:mail;host=127.0.0.1;port=3306 +admin_email: admin@fripost.org -- cgit v1.2.3 From 6c2cd2ab4ffb47f3dec5c08279a0afe83601b57c Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Fri, 18 Nov 2011 19:30:54 +0100 Subject: Add new function to just prompt for confirmation --- lib/Fripost/Prompt.pm | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/Fripost/Prompt.pm b/lib/Fripost/Prompt.pm index 0a9d5c6..d90d42d 100755 --- a/lib/Fripost/Prompt.pm +++ b/lib/Fripost/Prompt.pm @@ -17,9 +17,15 @@ use Exporter; use IO::Prompt; use String::MkPasswd qw/mkpasswd/; -our @EXPORT = qw(confirm_or_abort fix_username prompt_email prompt_password); +our @EXPORT = qw(confirm confirm_or_abort fix_username prompt_email prompt_password); our @ISA = qw(Exporter); +sub confirm { + my ($msg) = @_; + $msg //= "Is this OK? [no will abort] "; + return prompt $msg, -ynt; +} + sub confirm_or_abort { my ($msg) = @_; $msg //= "Is this OK? [no will abort] "; -- cgit v1.2.3 From 446ae9bf00bb59c245a8045ee7ab8a9f73599d78 Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Fri, 18 Nov 2011 19:31:03 +0100 Subject: Change order of user adding process --- fripost-adduser | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/fripost-adduser b/fripost-adduser index db312a2..5c21ef1 100755 --- a/fripost-adduser +++ b/fripost-adduser @@ -120,6 +120,15 @@ $msg->attr('content-type.charset' => 'utf-8'); dsay "-----------------------------------"; } +### Subscribe user to announce-list +if (confirm("Subscribe user to announce mailing list? ")) { + $msg->replace(From => $user->{username}); + $msg->replace(To => 'announce-subscribe@lists.fripost.org'); + $msg->replace(Subject => ''); + $msg->replace(Data => ''); + $msg->send(); +} + ### Send login credentials to new user { my ($vars, $data); @@ -151,16 +160,6 @@ $msg->attr('content-type.charset' => 'utf-8'); } } -### Subscribe user to announce-list -{ - confirm_or_abort("Subscribe user to announce mailing list? "); - $msg->replace(From => $user->{username}); - $msg->replace(To => 'announce-subscribe@lists.fripost.org'); - $msg->replace(Subject => ''); - $msg->replace(Data => ''); - $msg->send(); -} - =head1 AUTHOR Stefan Kangas C<< >> -- cgit v1.2.3