install script

This commit is contained in:
Lily Tsuru 2024-02-19 21:15:03 -05:00
parent 8efad4949e
commit 92368f1a6b
2 changed files with 20 additions and 7 deletions

7
build
View file

@ -86,11 +86,4 @@ pushd $TOP/sources/nginx
"${BASE_CONFIGURE_FLAGS[@]}" "${BASE_CONFIGURE_FLAGS[@]}"
make -j $(($(nproc)+1)) make -j $(($(nproc)+1))
#sudo systemctl stop nginx-cn
# strip binary of unneeded fluff (saving the original)
# cp objs/nginx objs/nginx.unstripped
# strip objs/nginx
# sudo cp objs/nginx /opt/nginx/usr/bin
#sudo systemctl start nginx-cn
#sudo make install
popd popd

20
install Executable file
View file

@ -0,0 +1,20 @@
#!/bin/bash
# Installs nginx-cn
TOP="$(pwd)"
[[ ! -d "$TOP/sources/nginx/objs" ]] && {
echo "You haven't built nginx-cn yet. Do so with ./build"
exit 1
}
pushd $TOP/sources
sudo systemctl stop nginx-cn
# strip binary of unneeded fluff (saving the original)
cp nginx/objs/nginx nginx/objs/nginx.unstripped
strip nginx/objs/nginx
sudo cp nginx/objs/nginx /opt/nginx/usr/bin
sudo systemctl start nginx-cn
#sudo make install
popd