nginx-cn/install

24 lines
680 B
Plaintext
Raw Normal View History

2024-02-19 21:15:03 -05:00
#!/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
}
2024-03-23 03:20:55 -04:00
# N.B: We do not use nginx's `make install` because it's very very bad
# and it overwrites $PREFIX/etc unconditionally. It's bad. I don't like it.
2024-02-19 21:15:03 -05:00
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
2024-03-25 05:47:19 -04:00
sudo cp nginx/objs/nginx /opt/nginx/bin
2024-02-19 21:15:03 -05:00
sudo systemctl start nginx-cn
#sudo make install
2024-03-25 05:47:19 -04:00
echo "Binary installed. You should probably copy the sample configuration to /opt/nginx/etc/nginx."
2024-02-19 21:15:03 -05:00
popd