docker-nginx-fancyindex/init.sh
2023-06-18 11:14:24 +08:00

20 lines
432 B
Bash
Executable File

#!/bin/sh
PUID=${PUID:-1000}
PGID=${PGID:-100}
groupmod -o -g "$PGID" public
usermod -o -u "$PUID" public
echo "**** Make sure the data folders exist ****"
[ ! -d /public ] && \
mkdir -p /public
[ ! -e /app/ssl/ssl.crt ] && \
cp -r /etc/nginx/ssl/ssl.* /app/ssl/
echo "**** Set Permissions ****" && \
chown -R "$PUID":"$PGID" /public
chown -R "$PUID":"$PGID" /fancyindex
echo "**** Setup complete, starting the server. ****"