mirror of
https://github.com/dmmeteo/docker-shlink-web-client.git
synced 2025-05-01 00:32:45 +01:00
19 lines
441 B
Bash
Executable File
19 lines
441 B
Bash
Executable File
#!/bin/sh
|
|
set -e
|
|
|
|
if [[ -z "$SHLINK_BASIC_AUTH_USERS" ]]; then
|
|
echo "No users found for basic auth"
|
|
else
|
|
echo "Creating .htpasswd file"
|
|
echo "$SHLINK_BASIC_AUTH_USERS" > /etc/nginx/.htpasswd
|
|
fi
|
|
|
|
if [[ -z "$SHLINK_BASIC_AUTH_USERS" ]]; then
|
|
echo "No name found for basic auth"
|
|
else
|
|
echo "Setting basic auth name"
|
|
sed -i "s/SHLINK_BASIC_AUTH_NAME/$SHLINK_BASIC_AUTH_NAME/g" /etc/nginx/conf.d/default.conf
|
|
fi
|
|
|
|
exec "$@"
|