From 2c7da66570999dcd21f11f976dc6ec27d820f45c Mon Sep 17 00:00:00 2001 From: Dan Fandrich Date: Fri, 4 Oct 2024 19:28:06 -0700 Subject: Use @ when accessing variables in templates Access without the @ symbol is the older method and is discouraged. --- modules/blog/templates/backup_blog-db.sh | 2 +- modules/blog/templates/backup_blog-files.sh | 4 ++-- modules/blog/templates/blogs_vhosts.conf | 2 +- modules/blog/templates/check_new-blog-post.sh | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) (limited to 'modules/blog/templates') diff --git a/modules/blog/templates/backup_blog-db.sh b/modules/blog/templates/backup_blog-db.sh index c497cb8f..f238f472 100755 --- a/modules/blog/templates/backup_blog-db.sh +++ b/modules/blog/templates/backup_blog-db.sh @@ -1,7 +1,7 @@ #!/bin/sh # Initialization -PATH_TO_FILE=${PATH_TO_FILE:-<%= blog_db_backupdir %>} +PATH_TO_FILE=${PATH_TO_FILE:-<%= @blog_db_backupdir %>} [ ! -f $PATH_TO_FILE/count ] && echo 0 > $PATH_TO_FILE/count COUNT=$(cat "$PATH_TO_FILE/count") # Backup each locale DB diff --git a/modules/blog/templates/backup_blog-files.sh b/modules/blog/templates/backup_blog-files.sh index e268ad2b..b8639014 100755 --- a/modules/blog/templates/backup_blog-files.sh +++ b/modules/blog/templates/backup_blog-files.sh @@ -1,7 +1,7 @@ #!/bin/bash # Initialization -PATH_TO_FILE=${PATH_TO_FILE:-<%= blog_files_backupdir %>} +PATH_TO_FILE=${PATH_TO_FILE:-<%= @blog_files_backupdir %>} [ ! -f $PATH_TO_FILE/count ] && echo 0 > $PATH_TO_FILE/count COUNT=$(cat "$PATH_TO_FILE/count") # Backup each locale @@ -12,7 +12,7 @@ do /bin/mkdir $PATH_TO_FILE/$locale fi # use relative paths to avoid "Removing leading `/' from member names'" warning - tar -C / -Jcf "$PATH_TO_FILE/$locale/$locale-$COUNT.tar.xz" "$(sed s,^/,, <<< "<%= blog_location %>/$locale")" + tar -C / -Jcf "$PATH_TO_FILE/$locale/$locale-$COUNT.tar.xz" "$(sed s,^/,, <<< "<%= @blog_location %>/$locale")" done # Check count file to have a week of backup in the directory if [ $COUNT -ne 6 ] diff --git a/modules/blog/templates/blogs_vhosts.conf b/modules/blog/templates/blogs_vhosts.conf index ff3c792f..5c1868bb 100644 --- a/modules/blog/templates/blogs_vhosts.conf +++ b/modules/blog/templates/blogs_vhosts.conf @@ -1,4 +1,4 @@ - > + > Order deny,allow Allow from All AllowOverride All diff --git a/modules/blog/templates/check_new-blog-post.sh b/modules/blog/templates/check_new-blog-post.sh index f2089a52..59181184 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 latest 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 '<%= blog_newpost_email_from %>' -s "Modification of the latest entry on English Blog" <%= blog_newpost_email_to %> + 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 latest 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 '<%= blog_newpost_email_from %>' -s "New entry on English Blog" <%= blog_newpost_email_to %> + 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