From 92368f1a6b671a2c914fcb4f7a9de475edba08f2 Mon Sep 17 00:00:00 2001 From: modeco80 Date: Mon, 19 Feb 2024 21:15:03 -0500 Subject: [PATCH] install script --- build | 7 ------- install | 20 ++++++++++++++++++++ 2 files changed, 20 insertions(+), 7 deletions(-) create mode 100755 install 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 +