nginx_build_script: add: install via argument
This commit is contained in:
parent
f1be365bbf
commit
37c91ac0d7
@ -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
|
curl https://raw.githubusercontent.com/minoplhy/scriptbox/main/nginx_build_script/build.sh > ~/nginx_scriptbox.sh
|
||||||
bash ~/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
|
# Arguments
|
||||||
```bash
|
```bash
|
||||||
@ -18,6 +23,9 @@ while [ ${#} -gt 0 ]; do
|
|||||||
--no-lua | -nl )
|
--no-lua | -nl )
|
||||||
DISABLE_LUA=true # Not include Lua in building
|
DISABLE_LUA=true # Not include Lua in building
|
||||||
;;
|
;;
|
||||||
|
--install | -i )
|
||||||
|
INSTALL=true # Install Nginx
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
@ -8,6 +8,9 @@ while [ ${#} -gt 0 ]; do
|
|||||||
--no-lua | -nl )
|
--no-lua | -nl )
|
||||||
DISABLE_LUA=true # Not include Lua in building
|
DISABLE_LUA=true # Not include Lua in building
|
||||||
;;
|
;;
|
||||||
|
--install | -i )
|
||||||
|
INSTALL=true # Install Nginx
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
@ -181,7 +184,7 @@ cd $HOMEDIRECTORY/nginx
|
|||||||
|
|
||||||
make
|
make
|
||||||
|
|
||||||
if [[ $Nginx_Install == "yes" ]]; then
|
if [[ $Nginx_Install == "yes" || $INSTALL == true ]]; then
|
||||||
mkdir -p /lib/nginx/ && mkdir -p /lib/nginx/modules
|
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
|
mkdir -p /etc/nginx && mkdir -p /etc/nginx/sites-enabled && mkdir -p /etc/nginx/modules-enabled
|
||||||
cp $HOMEDIRECTORY/nginx/objs/*.so /lib/nginx/modules
|
cp $HOMEDIRECTORY/nginx/objs/*.so /lib/nginx/modules
|
||||||
|
Loading…
Reference in New Issue
Block a user