mirror of
https://github.com/Websoft9/websoft9.git
synced 2024-11-21 07:00: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
|
@ -40,4 +40,8 @@ Websoft9 控制台 > 【用户账号】菜单中创建用户,创建完成后
|
|||
如果需要给用户添加 sudo,需要通过命令 visudo 将下面的内容增加到 sudoers 文件中(user001 表示您新创建的用户名)
|
||||
```
|
||||
user001 ALL=(ALL:ALL) ALL
|
||||
```
|
||||
```
|
||||
|
||||
#### appstore 502 error?
|
||||
|
||||
Try `docker restart websoft9-proxy` to solved it
|
|
@ -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
|
||||
|
|
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