From da59def2e10a45f7a7d21066e281b54f42da4ace Mon Sep 17 00:00:00 2001 From: Nicolas Vigier Date: Tue, 16 Apr 2013 13:56:45 +0000 Subject: blog: add variables to set blog emails --- modules/blog/manifests/init.pp | 2 ++ modules/blog/templates/check_new-blog-post.sh | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'modules') diff --git a/modules/blog/manifests/init.pp b/modules/blog/manifests/init.pp index f9056b62..efc128ad 100644 --- a/modules/blog/manifests/init.pp +++ b/modules/blog/manifests/init.pp @@ -4,6 +4,8 @@ class blog { $blog_location = "/var/www/vhosts/$blog_domain" $blog_db_backupdir = "/var/lib/backups/blog_db" $blog_files_backupdir = "/var/lib/backups/blog_files" + $blog_newpost_email_to = 'mageia-blogteam@mageia.org' + $blog_newpost_email_from = 'Mageia Blog bot ' user { 'blog': groups => apache, diff --git a/modules/blog/templates/check_new-blog-post.sh b/modules/blog/templates/check_new-blog-post.sh index 3f9d9755..2123ed4a 100755 --- a/modules/blog/templates/check_new-blog-post.sh +++ b/modules/blog/templates/check_new-blog-post.sh @@ -34,7 +34,7 @@ if [ "$tmp_old" = "$tmp_new" ] then # Modification on lastest post echo "YES - Modification" >> $PATH_TO_FILE"/last_check" - echo -e "The latest blog post has been modified and needs to be checked!\n\nTitle:\t$last_title\nAuthor:\t$last_creator\n-- \nMail sent by the script '$0' on `hostname`" | /bin/mail -r "Mageia Blog bot >" -s "Modification of the lastest entry on English Blog" mageia-blogteam@<%= domain %> + echo -e "The latest blog post has been modified and needs to be checked!\n\nTitle:\t$last_title\nAuthor:\t$last_creator\n-- \nMail sent by the script '$0' on `hostname`" | /bin/mail -r '<%= blog_newpost_email_from %>' -s "Modification of the lastest entry on English Blog" <%= blog_newpost_email_to %> echo $DATE else echo "NO" >> $PATH_TO_FILE"/last_check" @@ -42,7 +42,7 @@ if [ "$tmp_old" = "$tmp_new" ] else # New post to translate echo "YES - New entry" >> $PATH_TO_FILE"/last_check" - echo -e "A new blog post is waiting for translation:\n\nTitle:\t$last_title\nAuthor:\t$last_creator\n-- \nMail sent by the script '$0' on `hostname`" | /bin/mail -r "Mageia Blog bot >" -s "New entry on English Blog" mageia-blogteam@<%= domain %> + echo -e "A new blog post is waiting for translation:\n\nTitle:\t$last_title\nAuthor:\t$last_creator\n-- \nMail sent by the script '$0' on `hostname`" | /bin/mail -r '<%= blog_newpost_email_from %>' -s "New entry on English Blog" <%= blog_newpost_email_to %> echo $DATE fi -- cgit v1.2.1