update entrypoint.sh to fix config.toml creation logic and correct script execution condition
This commit is contained in:
+2
-1
@@ -6,6 +6,7 @@ chown -R ${PUID:-1000}:${PGID:-1000} /app/data 2>/dev/null || true
|
|||||||
SC_CONF_DIR="${XDG_CONFIG_HOME:-/home/appuser/.config}/scalable-cli"
|
SC_CONF_DIR="${XDG_CONFIG_HOME:-/home/appuser/.config}/scalable-cli"
|
||||||
mkdir -p "${SC_CONF_DIR}"
|
mkdir -p "${SC_CONF_DIR}"
|
||||||
chown -R ${PUID:-1000}:${PGID:-1000} "${SC_CONF_DIR}"
|
chown -R ${PUID:-1000}:${PGID:-1000} "${SC_CONF_DIR}"
|
||||||
|
|
||||||
if [ ! -f "${SC_CONF_DIR}/config.toml" ]; then
|
if [ ! -f "${SC_CONF_DIR}/config.toml" ]; then
|
||||||
cat > "${SC_CONF_DIR}/config.toml" <<'EOF'
|
cat > "${SC_CONF_DIR}/config.toml" <<'EOF'
|
||||||
[auth]
|
[auth]
|
||||||
@@ -15,7 +16,7 @@ EOF
|
|||||||
chown ${PUID:-1000}:${PGID:-1000} "${SC_CONF_DIR}/config.toml"
|
chown ${PUID:-1000}:${PGID:-1000} "${SC_CONF_DIR}/config.toml"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$1" = "python" ] || [ "$1" = "/app/scalable_sync.py\" ]; then
|
if [ "$1" = "python" ] || [ "$1" = "/app/scalable_sync.py" ]; then
|
||||||
shift
|
shift
|
||||||
exec gosu appuser python /app/scalable_sync.py "$@"
|
exec gosu appuser python /app/scalable_sync.py "$@"
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user