mirror of
https://github.com/Luzifer/nginx-sso.git
synced 2024-10-17 23:24:22 +00:00
Knut Ahlers
4fca15fa21
- Properly check file existence (`-f`, not `-d`) - Create and chown the data directory in case no mount is present closes #79 Signed-off-by: Knut Ahlers <knut@ahlers.me>
17 lines
496 B
Bash
Executable file
17 lines
496 B
Bash
Executable file
#!/usr/bin/dumb-init /bin/bash
|
|
set -euo pipefail
|
|
|
|
# Copy frontend if not available
|
|
[ -f /data/frontend/index.html ] || cp -r /usr/local/share/nginx-sso/frontend /data/
|
|
|
|
[ -e /data/config.yaml ] || {
|
|
cp /usr/local/share/nginx-sso/config.yaml /data/config.yaml
|
|
echo "An example configuration was copied to /data/config.yaml - You want to edit that one!"
|
|
exit 1
|
|
}
|
|
|
|
echo "Starting nginx-sso"
|
|
exec /usr/local/bin/nginx-sso \
|
|
--config /data/config.yaml \
|
|
--frontend-dir /data/frontend \
|
|
$@
|