diff --git a/docs/user.md b/docs/user.md index 0de61079..b99c6332 100644 --- a/docs/user.md +++ b/docs/user.md @@ -40,4 +40,8 @@ Websoft9 控制台 > 【用户账号】菜单中创建用户,创建完成后 如果需要给用户添加 sudo,需要通过命令 visudo 将下面的内容增加到 sudoers 文件中(user001 表示您新创建的用户名) ``` user001 ALL=(ALL:ALL) ALL -``` \ No newline at end of file +``` + +#### appstore 502 error? + +Try `docker restart websoft9-proxy` to solved it \ No newline at end of file diff --git a/install/install.sh b/install/install.sh index dca0e77f..cdfafcd5 100644 --- a/install/install.sh +++ b/install/install.sh @@ -105,6 +105,15 @@ fi 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 "\nYour installation parameters are as follows: " @@ -404,6 +413,10 @@ install_backends() { echo "Failed to start docker services." exit 1 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----------------------------------------- check_ports $http_port $https_port $port install_tools diff --git a/scripts/install_app.sh b/scripts/install_app.sh new file mode 100644 index 00000000..33cdd90d --- /dev/null +++ b/scripts/install_app.sh @@ -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 \ No newline at end of file