diff options
author | Nicolas Vigier <boklm@mageia.org> | 2011-05-15 21:07:28 +0000 |
---|---|---|
committer | Nicolas Vigier <boklm@mageia.org> | 2011-05-15 21:07:28 +0000 |
commit | 84e857e199a22b5b73a1397f654cdafac5fa7f3b (patch) | |
tree | 6cb469880f6ad28ac9a23d2727f462ad49b7c86f /modules/blog | |
parent | b1b71f37ac2ed5ab5d684f84e9d4b82080ab9923 (diff) | |
download | puppet-84e857e199a22b5b73a1397f654cdafac5fa7f3b.tar puppet-84e857e199a22b5b73a1397f654cdafac5fa7f3b.tar.gz puppet-84e857e199a22b5b73a1397f654cdafac5fa7f3b.tar.bz2 puppet-84e857e199a22b5b73a1397f654cdafac5fa7f3b.tar.xz puppet-84e857e199a22b5b73a1397f654cdafac5fa7f3b.zip |
change backup directory path
Diffstat (limited to 'modules/blog')
-rw-r--r-- | modules/blog/manifests/init.pp | 6 | ||||
-rwxr-xr-x | modules/blog/templates/backup_blog-db.sh | 2 | ||||
-rwxr-xr-x | modules/blog/templates/backup_blog-files.sh | 2 |
3 files changed, 6 insertions, 4 deletions
diff --git a/modules/blog/manifests/init.pp b/modules/blog/manifests/init.pp index ce4140b3..a495b66d 100644 --- a/modules/blog/manifests/init.pp +++ b/modules/blog/manifests/init.pp @@ -3,6 +3,8 @@ class blog { class base { $blog_location = "/var/www/vhosts/blog.$domain" $blog_domain = "blog.$domain" + $blog_db_backupdir = "/var/lib/backups/blog_db" + $blog_files_backupdir = "/var/lib/backups/blog_files" user { "blog": groups => apache, @@ -56,7 +58,7 @@ class blog { } } class db_backup inherits base { - file { "/var/lib/blog/backup": + file { $blog_db_backupdir: ensure => directory, owner => root, group => root, @@ -81,7 +83,7 @@ class blog { } } class files_backup inherits base { - file { "/var/lib/blog/backup": + file { $blog_files_backupdir: ensure => directory, owner => root, group => root, diff --git a/modules/blog/templates/backup_blog-db.sh b/modules/blog/templates/backup_blog-db.sh index 91996d25..2cd86fbb 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:-/var/lib/blog/backup} +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 d8683587..124f7ace 100755 --- a/modules/blog/templates/backup_blog-files.sh +++ b/modules/blog/templates/backup_blog-files.sh @@ -1,7 +1,7 @@ #!/bin/sh # Initialization -PATH_TO_FILE=${PATH_TO_FILE:-/var/lib/blog/backup} +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 |