#!/usr/bin/with-contenv bash # 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 [[ ! -f /config/calibre-web.log ]] && \ touch /config/calibre-web.log [[ -f /app/calibre-web/calibre-web.log ]] && \ rm /app/calibre-web/calibre-web.log [[ ! -L /app/calibre-web/calibre-web.log ]] && \ ln -s /config/calibre-web.log /app/calibre-web/calibre-web.log # permissions chown -R abc:abc \ /config \ /app/calibre-web