mirror of
https://github.com/minoplhy/scriptbox.git
synced 2024-12-05 01:46:57 +00:00
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
|
||||
cd $MAKE_DIR
|
||||
|
||||
while getopts 'v:g:n:s' flag
|
||||
do
|
||||
case "${flag}" in
|
||||
v) GITEA_GIT_TAG=${OPTARG};; # Gitea Git Tag
|
||||
g) GO_VERSION=${OPTARG};; # GOLANG Version
|
||||
n) NODEJS_VERSION=${OPTARG};; # NodeJS Version
|
||||
s) BUILD_STATIC="True";; # Build as Static Assets file
|
||||
while [ ${#} -gt 0 ]; do
|
||||
case "$1" in
|
||||
--git-tag | -v)
|
||||
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
|
||||
|
||||
# GITEA_GIT_TAG is being process below
|
||||
@ -72,7 +85,7 @@ fi
|
||||
export NODE_MAX_CONCURRENCY=1
|
||||
export GOMAXPROCS=1
|
||||
|
||||
if [[ "$BUILD_STATIC" == "True" ]]
|
||||
if [[ "$BUILD_STATIC" == true ]]
|
||||
then
|
||||
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
|
||||
|
@ -13,10 +13,28 @@ curl -L https://github.com/minoplhy/scriptbox/raw/main/build_gitea/Linux/build.s
|
||||
# Arguments
|
||||
|
||||
```bash
|
||||
v) GITEA_GIT_TAG=${OPTARG};; # Gitea Git Tag
|
||||
g) GO_VERSION=${OPTARG};; # GOLANG Version
|
||||
n) NODEJS_VERSION=${OPTARG};; # NodeJS Version
|
||||
s) BUILD_STATIC="True";; # Build as Static Assets file
|
||||
while [ ${#} -gt 0 ]; do
|
||||
case "$1" in
|
||||
--git-tag | -v)
|
||||
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
|
||||
|
@ -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.
|
||||
|
||||
```shell
|
||||
```bash
|
||||
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
|
||||
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_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:
|
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user