diff --git a/build b/build index 8f09967..9a72e65 100755 --- a/build +++ b/build @@ -86,11 +86,4 @@ pushd $TOP/sources/nginx "${BASE_CONFIGURE_FLAGS[@]}" 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 diff --git a/install b/install new file mode 100755 index 0000000..8de2ab2 --- /dev/null +++ b/install @@ -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 +