From af3caaa1e6b5dfcb48a4634ba6201449bb7e93b0 Mon Sep 17 00:00:00 2001 From: sparklyballs Date: Mon, 17 Jul 2017 18:49:38 +0100 Subject: [PATCH] tidy up symlinks --- root/etc/cont-init.d/30-config | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/root/etc/cont-init.d/30-config b/root/etc/cont-init.d/30-config index 4d4ce3a..d227b8a 100644 --- a/root/etc/cont-init.d/30-config +++ b/root/etc/cont-init.d/30-config @@ -1,10 +1,10 @@ #!/usr/bin/with-contenv bash -# copy database to /config if not exists -[[ ! -e /config/app.db ]] && \ - cp /defaults/app.db /config/app.db \ - # create symlinks for database and log +[[ ! -f /config/app.db ]] && \ + cp /defaults/app.db /config/app.db +[[ -f /app/calibre-web/app.db ]] && \ + rm /app/calibre-web/app.db [[ ! -L /app/calibre-web/app.db ]] && \ ln -s /config/app.db /app/calibre-web/app.db