Skip to content

Commit 99307e8

Browse files
committed
Create the logging directory when enabled
1 parent 2bf6db5 commit 99307e8

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

backup.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ export XZ_DEFAULTS="-T 0"
3131

3232
DIR_BACKUP=/backup/temp
3333
DIR_UPLOADED=/backup/uploaded
34-
mkdir $DIR_BACKUP 2>/dev/null
35-
mkdir $DIR_UPLOADED 2>/dev/null
34+
mkdir -p $DIR_BACKUP
35+
mkdir -p $DIR_UPLOADED
3636

3737
echo
3838
EXITCODE=0

entrypoint.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ else
1212
./backup.sh --startup
1313
# Create Ofelia config from template
1414
export LOGGING=${LOGGING:-true}
15+
if [ "$LOGGING" == "true" ]; then
16+
mkdir -p /backup/ofelia
17+
fi
1518
export SCHEDULE=${SCHEDULE:-"@midnight"}
1619
dockerize -template ofelia.ini.tmpl:/etc/ofelia/ofelia.ini
1720
# Execute standard CMD from Dockerfile

0 commit comments

Comments
 (0)