2017-03-20 18:34:52 -07:00
|
|
|
#!/usr/bin/with-contenv bash
|
|
|
|
|
2020-05-06 06:55:46 -07:00
|
|
|
# create symlinks for imagemagick policy.xml
|
|
|
|
[[ -f /etc/ImageMagick-6/policy.xml ]] && \
|
|
|
|
rm /etc/ImageMagick-6/policy.xml
|
|
|
|
[[ ! -L /etc/ImageMagick-6/policy.xml ]] && \
|
|
|
|
ln -s /defaults/policy.xml /etc/ImageMagick-6/policy.xml
|
|
|
|
|
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
|
|
|
|
2019-06-02 07:42:37 -07:00
|
|
|
# create symlinks for log
|
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
|
|
|
|
|
2019-06-02 07:55:03 -07:00
|
|
|
# create Google drive client_secrets.json file
|
2019-06-02 07:42:37 -07:00
|
|
|
[[ ! -f /config/client_secrets.json ]] && \
|
2019-06-04 20:48:24 -07:00
|
|
|
echo "{}" > /config/client_secrets.json
|
2019-06-02 07:42:37 -07:00
|
|
|
[[ -f /app/calibre-web/client_secrets.json ]] &&
|
2019-06-04 20:48:24 -07:00
|
|
|
rm /app/calibre-web/client_secrets.json
|
2019-06-02 07:42:37 -07:00
|
|
|
[[ ! -L /app/calibre-web/client_secrets.json ]] &&
|
2019-06-04 20:48:24 -07:00
|
|
|
ln -s /config/client_secrets.json /app/calibre-web/client_secrets.json
|
2017-07-17 10:40:54 -07:00
|
|
|
|
2019-06-02 07:55:03 -07:00
|
|
|
# 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
|
|
|
|
|
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
|