Kavita is a fast, feature rich, cross platform reading server. Built with the goal of being a full solution for all your reading needs. Setup your own server and share your reading collection with your friends and family.
C# annotationscbzcomicinfocomicscomics-readercross-platformcsharpepubepub-readerfreelinuxmangamedia-servermetadataopdsopds-feedpdfself-hostedubooquitywindows
Revert ability to run docker as non-root due to issues with Synology. (#1832)
Joe Milazzoed34a7150aef
diff --git a/entrypoint.sh b/entrypoint.shindex 33fe57a92..4ac47dc58 100644--- a/entrypoint.sh+++ b/entrypoint.sh@@ -1,18 +1,19 @@#! /bin/bash-# 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+# 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+#fiif [ ! -f "/kavita/config/appsettings.json" ]; thenecho "Kavita configuration file does not exist, creating..."@@ -24,24 +25,26 @@ fichmod +x 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+./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