From 69e2234828b7b36070d2599b16976bd07a0b95d5 Mon Sep 17 00:00:00 2001 From: modeco80 Date: Mon, 25 Mar 2024 05:47:19 -0400 Subject: [PATCH] install + build fixes --- build | 2 +- conf/{template.conf => template_site.conf} | 0 install | 4 ++-- sources/nginx-cn.service | 5 +++-- 4 files changed, 6 insertions(+), 5 deletions(-) rename conf/{template.conf => template_site.conf} (100%) diff --git a/build b/build index b8b31fa..0b0405f 100755 --- a/build +++ b/build @@ -90,7 +90,7 @@ pushd $TOP/sources/nginx # needed for lua-nginx-module export LUAJIT_INC="$PREFIX/include/luajit-2.1" -export LUAJIT_LIB="$PREFIX/nginx/lib" +export LUAJIT_LIB="$PREFIX/lib" # TODO: see ./install for --sbin-path ./auto/configure \ diff --git a/conf/template.conf b/conf/template_site.conf similarity index 100% rename from conf/template.conf rename to conf/template_site.conf diff --git a/install b/install index cb4f4a2..86a2e63 100755 --- a/install +++ b/install @@ -15,9 +15,9 @@ 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 - # FIXME: /opt/nginx/bin would probably be less annoying tbh.. - sudo cp nginx/objs/nginx /opt/nginx/usr/bin + sudo cp nginx/objs/nginx /opt/nginx/bin sudo systemctl start nginx-cn #sudo make install + echo "Binary installed. You should probably copy the sample configuration to /opt/nginx/etc/nginx." popd diff --git a/sources/nginx-cn.service b/sources/nginx-cn.service index a0b8b08..8db517d 100644 --- a/sources/nginx-cn.service +++ b/sources/nginx-cn.service @@ -10,8 +10,9 @@ PrivateDevices=yes PrivateTmp=true SyslogLevel=err -ExecStart=/opt/nginx/usr/bin/nginx -ExecReload=/opt/nginx/usr/bin/nginx -s reload +ExecStart=/opt/nginx/bin/nginx +ExecReload=/opt/nginx/bin/nginx -s reload +Environment=LD_LIBRARY_PATH=/opt/nginx/lib Restart=on-failure KillMode=mixed KillSignal=SIGQUIT