aboutsummaryrefslogtreecommitdiffstats
path: root/modules/blog
diff options
context:
space:
mode:
authorDan Fandrich <dan@coneharvesters.com>2023-12-12 20:51:45 -0800
committerDan Fandrich <dan@coneharvesters.com>2023-12-12 20:51:45 -0800
commitcf61e3239a9c0ccd16eab2507ed9cf46bc7b1133 (patch)
tree1be8ef18aeaf843bde0036cb46fbb34e943881e5 /modules/blog
parent5a5daa16a1a8493927d2779dd53898b27316a179 (diff)
downloadpuppet-cf61e3239a9c0ccd16eab2507ed9cf46bc7b1133.tar
puppet-cf61e3239a9c0ccd16eab2507ed9cf46bc7b1133.tar.gz
puppet-cf61e3239a9c0ccd16eab2507ed9cf46bc7b1133.tar.bz2
puppet-cf61e3239a9c0ccd16eab2507ed9cf46bc7b1133.tar.xz
puppet-cf61e3239a9c0ccd16eab2507ed9cf46bc7b1133.zip
Fix Removing leading `/' from member names' warning
This should stop an unnecessary cron warning e-mail.
Diffstat (limited to 'modules/blog')
-rwxr-xr-xmodules/blog/templates/backup_blog-files.sh5
1 files changed, 3 insertions, 2 deletions
diff --git a/modules/blog/templates/backup_blog-files.sh b/modules/blog/templates/backup_blog-files.sh
index 45b4dc42..e268ad2b 100755
--- a/modules/blog/templates/backup_blog-files.sh
+++ b/modules/blog/templates/backup_blog-files.sh
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
# Initialization
PATH_TO_FILE=${PATH_TO_FILE:-<%= blog_files_backupdir %>}
@@ -11,7 +11,8 @@ do
then
/bin/mkdir $PATH_TO_FILE/$locale
fi
- tar Jcf $PATH_TO_FILE/$locale/$locale-$COUNT.tar.xz <%= blog_location %>/$locale
+ # 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")"
done
# Check count file to have a week of backup in the directory
if [ $COUNT -ne 6 ]