Skip to content

Commit

Permalink
Add the ability to set additional modules
Browse files Browse the repository at this point in the history
  • Loading branch information
VirtuBox committed Apr 25, 2024
1 parent ebaef3b commit 06addbc
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions nginx-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,10 @@ else
--dynamic)
DYNAMIC_MODULES="y"
;;
--modules)
MODULES_LIST="$2"
shift
;;
--cron | --cronjob)
CRON_SETUP="y"
;;
Expand Down Expand Up @@ -523,6 +527,11 @@ _download_modules() {
for MODULE in $MODULES; do
_gitget "$MODULE"
done
if [ -n "$MODULES_LIST" ]; then
for ADDITIONAL_MODULE in $MODULES_LIST; do
_gitget "$ADDITIONAL_MODULE"
done
fi
if [ "$RTMP" = "y" ]; then
{ [ -d "$DIR_SRC/nginx-rtmp-module" ] && {
git -C "$DIR_SRC/nginx-rtmp-module" pull &
Expand Down Expand Up @@ -797,6 +806,14 @@ _configure_nginx() {
else
NGINX_THIRD_MODULES="$OVERRIDE_NGINX_ADDITIONAL_MODULES"
fi
if [ -n "$MODULES_LIST" ]; then
while read -r ADDITIONAL_MODULE; do
# Extraire le nom du module
MODULE_NAME=$(basename "$ADDITIONAL_MODULE")
# Ajouter le module à NGINX_THIRD_MODULES
NGINX_THIRD_MODULES+=" --add-module=../$MODULE_NAME"
done <<<"$MODULES_LIST"
fi

if [ "$OS_ARCH" = 'x86_64' ]; then
if [ "$DISTRO_ID" = "Ubuntu" ]; then
Expand Down

0 comments on commit 06addbc

Please sign in to comment.