update
This commit is contained in:
parent
cf6edeec37
commit
d6188ebafb
@ -1,7 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
run(){
|
run(){
|
||||||
local script_dir=$(cd "$(dirname "$0")"; pwd) # 脚本文件绝对路径
|
local script_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/" # 脚本文件夹绝对路径
|
||||||
local config_dir=$(readlink -f "$script_dir/../conf") # 配置文件绝对路径
|
local config_dir=$(readlink -f "$script_dir/../conf") # 配置文件绝对路径
|
||||||
|
|
||||||
# 如果配置文件不存在或者空白
|
# 如果配置文件不存在或者空白
|
||||||
|
|||||||
@ -45,7 +45,7 @@ find_free_port() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
update_port(){
|
update_port(){
|
||||||
local script_dir=$(cd "$(dirname "$0")"; pwd)
|
local script_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/
|
||||||
local config_dir="$script_dir/../conf"
|
local config_dir="$script_dir/../conf"
|
||||||
source "$script_dir/utils/jq_util.sh"
|
source "$script_dir/utils/jq_util.sh"
|
||||||
|
|
||||||
@ -54,4 +54,4 @@ update_port(){
|
|||||||
echo "设置端口成功"
|
echo "设置端口成功"
|
||||||
}
|
}
|
||||||
|
|
||||||
update_port
|
update_port
|
||||||
|
|||||||
@ -25,7 +25,7 @@ restart_docker() {
|
|||||||
|
|
||||||
# 安装依赖
|
# 安装依赖
|
||||||
install_dependencies(){
|
install_dependencies(){
|
||||||
local script_dir="$(cd "$(dirname "$0")"; pwd)/bin" # 脚本所在目录
|
local script_dir=""$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)//bin" # 脚本所在目录
|
||||||
source "${script_dir}/utils/base.sh"
|
source "${script_dir}/utils/base.sh"
|
||||||
|
|
||||||
if ! command -v curl >/dev/null 2>&1; then
|
if ! command -v curl >/dev/null 2>&1; then
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user