Kavita/entrypoint.sh
Joe Milazzo 25703d6fe0
More Fixes (#1993)
* Strip just isbn: from epub isbns and log when it's back (books)

* Tweaked to allow invalid GTINs but only valid ISBN 10/13s will be saved to Kavita.

* Fixed a bug with parsing series from a filename that is just a chapter range and no chapter/volume keywords.

* Show the media issue count before you open accordion

* Added a inpage filter for Media issues

* Cleanup styles

* Fixed up some code in epub isbn parsing when it's null

* Encode filenames when downloading so that non english characters can be passed properly to UI.

* Added support to parse ComicInfo's with Empty Tags.

* Reset development settings.

* Tweaked the code in generating reading lists to avoid extra work when not needed.

* Fix comicvine's favicon

* Fixed up a unit test

* Tweaked the favicon code to ignore icons that have query parameters

* More favicon work. Expanded ability to grab icons a bit. Added in ability to not keep requesting favicons when we failed to parse already.

* Added a note for later

* Fixed stats server url

* Added more debugging

* Fixed unit tests
2023-05-14 16:14:27 -07:00

58 lines
1.8 KiB
Bash

#! /bin/bash
# Removed - This is causing issues for Synology users
## Set default UID and GID for Kavita but allow overrides
#PUID=${PUID:-0}
#PGID=${PGID:-0}
#
## Add Kavita group if it doesn't already exist
#if [[ -z "$(getent group "$PGID" | cut -d':' -f1)" ]]; then
# groupadd -o -g "$PGID" kavita
#fi
#
## Add Kavita user if it doesn't already exist
#if [[ -z "$(getent passwd "$PUID" | cut -d':' -f1)" ]]; then
# useradd -o -u "$PUID" -g "$PGID" -d /kavita kavita
#fi
#Checks if the config file exists, and creates it if it does not
if [ ! -f "/kavita/config/appsettings.json" ]; then
echo "Kavita configuration file does not exist, copying from temp..."
cp /tmp/config/appsettings.json /kavita/config/appsettings.json
if [ -f "/kavita/config/appsettings.json" ]; then
echo "Copy completed successfully, starting app..."
else
echo "Copy failed, check folder permissions. Exiting..."
exit
fi
fi
echo "App setting permissions"
echo ls -l "/kavita/config/appsettings.json"
chmod +x Kavita
./Kavita
#if [[ "$PUID" -eq 0 ]]; then
# # Run as root
# ./Kavita
#else
# # Set ownership on config dir if running non-root and current ownership is different
# if [[ ! "$(stat -c %u /kavita/config)" = "$PUID" ]]; then
# echo "Specified PUID differs from Kavita config dir ownership, updating permissions now..."
# if [[ ! "$(stat -c %g /kavita/config)" = "$PGID" ]]; then
# chown -R "$PUID":"$PGID" /kavita/config
# else
# chown -R "$PUID" /kavita/config
# fi
#
# elif [[ ! "$(stat -c %g /kavita/config)" = "$PGID" ]]; then
# echo "Specified PGID differs from Kavita config dir ownership, updating permissions now..."
# chgrp -R "$PGID" /kavita/config
# fi
#
# # Run as non-root user
# su -l kavita -c ./Kavita
#fi