diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index d2a8701..c623fd1 100755 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -13,6 +13,7 @@ if [ -d "${DATADIR}/modules" ]; then # Build modules. for module in $modules; do + echo "Building module $module..." cd "$(dirname "$module")" znc-buildmod "$module" done @@ -23,13 +24,16 @@ fi # Create default config if it doesn't exist if [ ! -f "${DATADIR}/configs/znc.conf" ]; then + echo "Creating a default configuration..." mkdir -p "${DATADIR}/configs" cp /znc.conf.default "${DATADIR}/configs/znc.conf" fi # Make sure $DATADIR is owned by znc user. This effects ownership of the # mounted directory on the host machine too. +echo "Setting necessary permissions..." chown -R znc:znc "$DATADIR" # Start ZNC. +echo "Starting ZNC..." exec sudo -u znc znc --foreground --datadir="$DATADIR" $@