Merge branch 'main' of https://github.com/minoplhy/scriptbox
This commit is contained in:
commit
a18b0ecbdf
@ -7,14 +7,27 @@ rm -rf $DESTINATION
|
|||||||
mkdir -p $DESTINATION
|
mkdir -p $DESTINATION
|
||||||
cd $MAKE_DIR
|
cd $MAKE_DIR
|
||||||
|
|
||||||
while getopts 'v:g:n:s' flag
|
while [ ${#} -gt 0 ]; do
|
||||||
do
|
case "$1" in
|
||||||
case "${flag}" in
|
--git-tag | -v)
|
||||||
v) GITEA_GIT_TAG=${OPTARG};; # Gitea Git Tag
|
shift
|
||||||
g) GO_VERSION=${OPTARG};; # GOLANG Version
|
GITEA_GIT_TAG=$1
|
||||||
n) NODEJS_VERSION=${OPTARG};; # NodeJS Version
|
;; # Gitea Git Tag
|
||||||
s) BUILD_STATIC="True";; # Build as Static Assets file
|
--golang-version | -g)
|
||||||
|
shift
|
||||||
|
GO_VERSION=$1
|
||||||
|
;; # GOLANG Version
|
||||||
|
--nodejs-version | -n)
|
||||||
|
shift
|
||||||
|
NODEJS_VERSION=$1
|
||||||
|
;; # NodeJS Version
|
||||||
|
--static | -s)
|
||||||
|
BUILD_STATIC=true
|
||||||
|
;; # Build as Static Assets file
|
||||||
|
*)
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
|
shift # Shift to next response for parsing
|
||||||
done
|
done
|
||||||
|
|
||||||
# GITEA_GIT_TAG is being process below
|
# GITEA_GIT_TAG is being process below
|
||||||
@ -72,7 +85,7 @@ fi
|
|||||||
export NODE_MAX_CONCURRENCY=1
|
export NODE_MAX_CONCURRENCY=1
|
||||||
export GOMAXPROCS=1
|
export GOMAXPROCS=1
|
||||||
|
|
||||||
if [[ "$BUILD_STATIC" == "True" ]]
|
if [[ "$BUILD_STATIC" == true ]]
|
||||||
then
|
then
|
||||||
mkdir -p $DESTINATION/gitea-static
|
mkdir -p $DESTINATION/gitea-static
|
||||||
LDFLAGS="-X \"code.gitea.io/gitea/modules/setting.AppWorkPath=/var/lib/gitea/\" -X \"code.gitea.io/gitea/modules/setting.CustomConf=/etc/gitea/app.ini\"" TAGS="bindata sqlite sqlite_unlock_notify" GOOS=linux GOARCH=amd64 make frontend
|
LDFLAGS="-X \"code.gitea.io/gitea/modules/setting.AppWorkPath=/var/lib/gitea/\" -X \"code.gitea.io/gitea/modules/setting.CustomConf=/etc/gitea/app.ini\"" TAGS="bindata sqlite sqlite_unlock_notify" GOOS=linux GOARCH=amd64 make frontend
|
||||||
|
@ -13,10 +13,28 @@ curl -L https://github.com/minoplhy/scriptbox/raw/main/build_gitea/Linux/build.s
|
|||||||
# Arguments
|
# Arguments
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
v) GITEA_GIT_TAG=${OPTARG};; # Gitea Git Tag
|
while [ ${#} -gt 0 ]; do
|
||||||
g) GO_VERSION=${OPTARG};; # GOLANG Version
|
case "$1" in
|
||||||
n) NODEJS_VERSION=${OPTARG};; # NodeJS Version
|
--git-tag | -v)
|
||||||
s) BUILD_STATIC="True";; # Build as Static Assets file
|
shift
|
||||||
|
GITEA_GIT_TAG=$1
|
||||||
|
;; # Gitea Git Tag
|
||||||
|
--golang-version | -g)
|
||||||
|
shift
|
||||||
|
GO_VERSION=$1
|
||||||
|
;; # GOLANG Version
|
||||||
|
--nodejs-version | -n)
|
||||||
|
shift
|
||||||
|
NODEJS_VERSION=$1
|
||||||
|
;; # NodeJS Version
|
||||||
|
--static | -s)
|
||||||
|
BUILD_STATIC=true
|
||||||
|
;; # Build as Static Assets file
|
||||||
|
*)
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
shift # Shift to next response for parsing
|
||||||
|
done
|
||||||
```
|
```
|
||||||
|
|
||||||
# Known Issues
|
# Known Issues
|
||||||
|
@ -2,15 +2,57 @@
|
|||||||
|
|
||||||
The script here is entirely copied from [minoplhy/nginquic](https://github.com/minoplhy/nginquic)@ModSecurity_incl. Which included ModSecurity for my own using.
|
The script here is entirely copied from [minoplhy/nginquic](https://github.com/minoplhy/nginquic)@ModSecurity_incl. Which included ModSecurity for my own using.
|
||||||
|
|
||||||
```shell
|
```bash
|
||||||
export Nginx_Install=yes # This variable is required if you want Nginx to be installed scriptibly (on Debian-based systems).
|
export Nginx_Install=yes # This variable is required if you want Nginx to be installed scriptibly (on Debian-based systems).
|
||||||
curl https://raw.githubusercontent.com/minoplhy/scriptbox/main/nginx_build_script/build.sh > ~/nginx_scriptbox.sh
|
curl https://raw.githubusercontent.com/minoplhy/scriptbox/main/nginx_build_script/build.sh > ~/nginx_scriptbox.sh
|
||||||
bash ~/nginx_scriptbox.sh
|
bash ~/nginx_scriptbox.sh
|
||||||
```
|
```
|
||||||
|
new way to run! :
|
||||||
|
```bash
|
||||||
|
# With install Nginx
|
||||||
|
curl https://raw.githubusercontent.com/minoplhy/scriptbox/main/nginx_build_script/build.sh | bash -s -- --install
|
||||||
|
```
|
||||||
|
|
||||||
#### Note : don't forgot to add necessary `lua_package_path` directive to `nginx.conf`, in the http context. else Nginx won't run.
|
# Arguments
|
||||||
|
```bash
|
||||||
|
while [ ${#} -gt 0 ]; do
|
||||||
|
case "$1" in
|
||||||
|
--no-modsecurity | -nm ) DISABLE_MODSECURITY=true;; # Not include ModSecurity in building
|
||||||
|
--no-lua | -nl ) DISABLE_LUA=true ;; # Not include Lua in building
|
||||||
|
--install | -i ) INSTALL=true ;; # Install Nginx
|
||||||
|
--ssl=* )
|
||||||
|
SSL_LIB="${1#*=}"
|
||||||
|
case $SSL_LIB in # Re-define SSL_LIB
|
||||||
|
"quictls") SSL_LIB="quictls" ;;
|
||||||
|
"boringssl") SSL_LIB="boringssl" ;;
|
||||||
|
"libressl") SSL_LIB="libressl" ;;
|
||||||
|
"")
|
||||||
|
echo "ERROR : --ssl= is empty!"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "ERROR : Vaild values for --ssl are -> quictls, boringssl, libressl"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Note :
|
||||||
|
* don't forgot to add necessary `lua_package_path` directive to `nginx.conf`, in the http context. else Nginx won't run.
|
||||||
```lua
|
```lua
|
||||||
lua_package_path "/usr/local/lua/?.lua;;';
|
lua_package_path "/usr/local/lua/?.lua;;";
|
||||||
|
```
|
||||||
|
|
||||||
|
* LibreSSL is broken when compile with Nginx Lua
|
||||||
|
taken from compiler:
|
||||||
|
```
|
||||||
|
error: implicit declaration of function ‘SSL_client_hello_get0_ext’ [-Werror=implicit-function-declaration]
|
||||||
```
|
```
|
||||||
|
|
||||||
systemd Template:
|
systemd Template:
|
||||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user