docker-calibre-web/root/etc/cont-init.d/30-config

23 lines
621 B
Plaintext
Raw Normal View History

2017-03-20 18:34:52 -07:00
#!/usr/bin/with-contenv bash
2017-07-17 10:40:54 -07:00
# create symlinks for database and log
2017-07-17 10:49:38 -07:00
[[ ! -f /config/app.db ]] && \
cp /defaults/app.db /config/app.db
[[ -f /app/calibre-web/app.db ]] && \
rm /app/calibre-web/app.db
2017-07-17 09:36:32 -07:00
[[ ! -L /app/calibre-web/app.db ]] && \
ln -s /config/app.db /app/calibre-web/app.db
2017-03-20 18:34:52 -07:00
2017-07-17 10:40:54 -07:00
[[ ! -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
2017-06-06 23:33:43 -07:00
# permissions
2017-03-20 18:34:52 -07:00
chown -R abc:abc \
2017-06-06 23:33:43 -07:00
/config \
2017-07-17 09:36:32 -07:00
/app/calibre-web