nginx_build_script: add: install via argument

This commit is contained in:
minoplhy 2024-04-27 23:03:14 +07:00
parent f1be365bbf
commit 37c91ac0d7
Signed by: minoplhy
GPG Key ID: 41D406044E2434BF
2 changed files with 12 additions and 1 deletions

View File

@ -7,6 +7,11 @@ export Nginx_Install=yes # This variable is required if you want Nginx to be in
curl https://raw.githubusercontent.com/minoplhy/scriptbox/main/nginx_build_script/build.sh > ~/nginx_scriptbox.sh
bash ~/nginx_scriptbox.sh
```
new way to run! :
```bash
# With install Nginx
curl https://raw.githubusercontent.com/minoplhy/scriptbox/main/nginx_build_script/build.sh | bash -s -- --install
```
# Arguments
```bash
@ -18,6 +23,9 @@ while [ ${#} -gt 0 ]; do
--no-lua | -nl )
DISABLE_LUA=true # Not include Lua in building
;;
--install | -i )
INSTALL=true # Install Nginx
;;
*)
;;
esac

View File

@ -8,6 +8,9 @@ while [ ${#} -gt 0 ]; do
--no-lua | -nl )
DISABLE_LUA=true # Not include Lua in building
;;
--install | -i )
INSTALL=true # Install Nginx
;;
*)
;;
esac
@ -181,7 +184,7 @@ cd $HOMEDIRECTORY/nginx
make
if [[ $Nginx_Install == "yes" ]]; then
if [[ $Nginx_Install == "yes" || $INSTALL == true ]]; then
mkdir -p /lib/nginx/ && mkdir -p /lib/nginx/modules
mkdir -p /etc/nginx && mkdir -p /etc/nginx/sites-enabled && mkdir -p /etc/nginx/modules-enabled
cp $HOMEDIRECTORY/nginx/objs/*.so /lib/nginx/modules