21 lines
436 B
Text
21 lines
436 B
Text
|
#!/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
|
||
|
|