From 1cb1f09abcd0ee1773732aa273a4f91174d588b6 Mon Sep 17 00:00:00 2001 From: chbmb Date: Sun, 2 Jun 2019 15:55:03 +0100 Subject: [PATCH] Gdrive fix --- root/etc/cont-init.d/30-config | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/root/etc/cont-init.d/30-config b/root/etc/cont-init.d/30-config index 24fa15e..e5081a3 100644 --- a/root/etc/cont-init.d/30-config +++ b/root/etc/cont-init.d/30-config @@ -16,7 +16,7 @@ [[ ! -L /app/calibre-web/calibre-web.log ]] && \ ln -s /config/calibre-web.log /app/calibre-web/calibre-web.log -# Google Drive Integration +# create Google drive client_secrets.json file [[ ! -f /config/client_secrets.json ]] && \ echo "{}" > /config/client_secrets.json [[ -f /app/calibre-web/client_secrets.json ]] && @@ -24,6 +24,14 @@ [[ ! -L /app/calibre-web/client_secrets.json ]] && ln -s /config/client_secrets.json /app/calibre-web/client_secrets.json +# create Google drive symlinks for database +[[ ! -f /config/gdrive.db ]] && \ + cp /app/calibre-web/gdrive.db /config/gdrive.db +[[ -f /app/calibre-web/gdrive.db ]] && \ + rm /app/calibre-web/gdrive.db +[[ ! -L /app/calibre-web/gdrive.db ]] && \ + ln -s /config/gdrive.db /app/calibre-web/gdrive.db + # permissions chown -R abc:abc \ /config \