lib: get_host_port is $IP:3000 or read from app.ini
This commit is contained in:
parent
b62866f3ae
commit
078107026b
1 changed files with 11 additions and 1 deletions
12
lib/lib.sh
12
lib/lib.sh
|
@ -29,7 +29,6 @@ IP=$(hostname -I | cut -f1 -d' ')
|
||||||
RELEASE_NUMBERS="7.0 8.0"
|
RELEASE_NUMBERS="7.0 8.0"
|
||||||
|
|
||||||
PREFIX===============
|
PREFIX===============
|
||||||
HOST_PORT=$IP:3000
|
|
||||||
export DIR=/tmp/forgejo-end-to-end
|
export DIR=/tmp/forgejo-end-to-end
|
||||||
DIR_BINARIES=/srv/forgejo-binaries
|
DIR_BINARIES=/srv/forgejo-binaries
|
||||||
export DOT_FORGEJO_CURL=$DIR/forgejo-curl
|
export DOT_FORGEJO_CURL=$DIR/forgejo-curl
|
||||||
|
@ -258,6 +257,17 @@ function start() {
|
||||||
start_forgejo $version
|
start_forgejo $version
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function get_host_port() {
|
||||||
|
local config="$1"
|
||||||
|
if test -z "$config" ; then
|
||||||
|
echo "$IP:3000"
|
||||||
|
else
|
||||||
|
echo "$IP:$(sed -n -e 's/^HTTP_PORT *= *\(.*\)/\1/p' < $config)"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
HOST_PORT=$(get_host_port)
|
||||||
|
|
||||||
function work_path_base() {
|
function work_path_base() {
|
||||||
local config="$1"
|
local config="$1"
|
||||||
if test -z "$config" ; then
|
if test -z "$config" ; then
|
||||||
|
|
Loading…
Add table
Reference in a new issue