1
0
mirror of https://github.com/azlux/log2ram synced 2024-11-23 13:56:30 +00:00

Compare commits

...

2 Commits

Author SHA1 Message Date
a342af9ed8 Fix ansible variable name 2022-03-04 15:34:41 +01:00
fd7cebbd1d check if folder exist
Fix for #147
2022-03-04 13:54:33 +01:00
2 changed files with 5 additions and 2 deletions

View File

@ -61,8 +61,8 @@
backrefs: true backrefs: true
loop: loop:
- {regexp: '^SIZE=(.*)$', line: 'SIZE={{ log2ram_size }}'} - {regexp: '^SIZE=(.*)$', line: 'SIZE={{ log2ram_size }}'}
- {regexp: 'USE_RSYNC=(.*)$', line: 'SIZE={{ log2ram_use_rsync }}'} - {regexp: 'USE_RSYNC=(.*)$', line: 'USE_RSYNC={{ log2ram_use_rsync }}'}
- {regexp: '^MAIL=(.*)$', line: 'SIZE={{ log2ram_mail }}'} - {regexp: '^MAIL=(.*)$', line: 'MAIL={{ log2ram_mail }}'}
- {regexp: '^PATH_DISK=(.*)$', line: 'PATH_DISK="{{ log2ram_path_disk }}"'} - {regexp: '^PATH_DISK=(.*)$', line: 'PATH_DISK="{{ log2ram_path_disk }}"'}
- {regexp: '^ZL2R=(.*)$', line: 'ZL2R={{ log2ram_use_z2lr|lower }}'} - {regexp: '^ZL2R=(.*)$', line: 'ZL2R={{ log2ram_use_z2lr|lower }}'}
- {regexp: '^COMP_ALG=(.*)$', line: 'COMP_ALG={{ log2ram_comp_alg }}'} - {regexp: '^COMP_ALG=(.*)$', line: 'COMP_ALG={{ log2ram_comp_alg }}'}

View File

@ -89,6 +89,9 @@ case "$1" in
start) start)
IFS=';' IFS=';'
for i in $PATH_DISK; do for i in $PATH_DISK; do
# Skip the path if the folder doesn't exist
[ ! -d "$i" ] && continue
PATH_FIRST_PART="${i%/*}" PATH_FIRST_PART="${i%/*}"
PATH_LAST_PART="${i##/*/}" PATH_LAST_PART="${i##/*/}"
RAM_LOG="$i" RAM_LOG="$i"