mirror of
https://github.com/Websoft9/websoft9.git
synced 2024-11-21 15:10:22 +00:00
add execute_mode for install.sh
This commit is contained in:
parent
34bdb8a5b1
commit
8c6a062274
3 changed files with 59 additions and 2 deletions
|
@ -41,3 +41,7 @@ Websoft9 控制台 > 【用户账号】菜单中创建用户,创建完成后
|
||||||
```
|
```
|
||||||
user001 ALL=(ALL:ALL) ALL
|
user001 ALL=(ALL:ALL) ALL
|
||||||
```
|
```
|
||||||
|
|
||||||
|
#### appstore 502 error?
|
||||||
|
|
||||||
|
Try `docker restart websoft9-proxy` to solved it
|
|
@ -105,6 +105,15 @@ fi
|
||||||
|
|
||||||
starttime=$(date +%s)
|
starttime=$(date +%s)
|
||||||
|
|
||||||
|
# Check is install or upgrade
|
||||||
|
if systemctl cat websoft9 >/dev/null 2>&1 && systemctl cat cockpit >/dev/null 2>&1 && sudo docker ps -a --format '{{.Names}}' 2>/dev/null | grep -q '^websoft9-apphub'; then
|
||||||
|
echo "execute_mode=upgrade"
|
||||||
|
export execute_mode="upgrade"
|
||||||
|
else
|
||||||
|
echo "execute_mode=install"
|
||||||
|
export execute_mode="install"
|
||||||
|
fi
|
||||||
|
|
||||||
# 输出参数值
|
# 输出参数值
|
||||||
echo -e "\n------ Welcome to install Websoft9, it will take 3-5 minutes ------"
|
echo -e "\n------ Welcome to install Websoft9, it will take 3-5 minutes ------"
|
||||||
echo -e "\nYour installation parameters are as follows: "
|
echo -e "\nYour installation parameters are as follows: "
|
||||||
|
@ -404,6 +413,10 @@ install_backends() {
|
||||||
echo "Failed to start docker services."
|
echo "Failed to start docker services."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ "$execute_mode" = "install" ]; then
|
||||||
|
sudo docker exec -i websoft9-apphub apphub setconfig --section domain --key wildcard_domain --value ""
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -443,7 +456,6 @@ install_systemd() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#--------------- main-----------------------------------------
|
#--------------- main-----------------------------------------
|
||||||
check_ports $http_port $https_port $port
|
check_ports $http_port $https_port $port
|
||||||
install_tools
|
install_tools
|
||||||
|
|
41
scripts/install_app.sh
Normal file
41
scripts/install_app.sh
Normal file
|
@ -0,0 +1,41 @@
|
||||||
|
#!/bin/bash
|
||||||
|
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
|
||||||
|
export PATH
|
||||||
|
|
||||||
|
# About this Script and command-line options
|
||||||
|
# ==============================================================================
|
||||||
|
#
|
||||||
|
# --dist
|
||||||
|
# Use the --dist option to install distribution at variable.json file. default is community, for example:
|
||||||
|
#
|
||||||
|
# $ sudo bash install_app.sh --dist community
|
||||||
|
#
|
||||||
|
# --version "2.0.1"
|
||||||
|
# Use the --version option to set application version. default is lastest, for example:
|
||||||
|
#
|
||||||
|
# $ sudo bash install_app.sh --version "2.0.1"
|
||||||
|
#
|
||||||
|
# --appanme "wordpress"
|
||||||
|
# Use the --appanme option for install which application. default is wordpress, for example:
|
||||||
|
#
|
||||||
|
# $ sudo bash install_app.sh --appanme "wordpress"
|
||||||
|
#
|
||||||
|
# --appid "mywp"
|
||||||
|
# Use the --appid option to distinguish installed application, default is mywp, for example:
|
||||||
|
#
|
||||||
|
# $ sudo bash install_app.sh --appid "mywp"
|
||||||
|
#
|
||||||
|
# --domain_names "www.websoft9.com,dev.websoft9.com"
|
||||||
|
# Use the --domain_names option to binding domains for application,it can use any strings (not more than 2), default is "", for example:
|
||||||
|
#
|
||||||
|
# $ sudo bash install.sh --domain_names "test.websoft9.com"
|
||||||
|
# $ sudo bash install.sh --domain_names "47.92.175.174"
|
||||||
|
# $ sudo bash install.sh --domain_names "test1.websoft9.com,test2.websoft9.com"
|
||||||
|
# ==============================================================================
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# Get Internet IP by path/scripts/get_ip.sh
|
||||||
|
# if have W9_URL, then proxy_enabled=true
|
||||||
|
# Get the installed application status
|
||||||
|
# if active, docker compose ps
|
Loading…
Reference in a new issue