mirror of
https://github.com/Websoft9/websoft9.git
synced 2024-11-21 15:10:22 +00:00
fix
This commit is contained in:
parent
2763e0c928
commit
6db2e3ca44
3 changed files with 24 additions and 14 deletions
|
@ -34,9 +34,11 @@ You can see the sceenshoots below:
|
|||
- Manage your Linux by GUI: Inspect and change network settings, Configure a firewall, Manage storage, Browse and search system logs, Inspect a system’s hardware, Inspect and interact with systemd-based services,
|
||||
- Supported languages: English, Chinese(中文)
|
||||
|
||||
# Install & Upgrade
|
||||
# Installation
|
||||
|
||||
You should have root privileges user to install or upgrade Websoft9, if you use no-root user you can `sudo su` for it
|
||||
You should have root privileges user to install or upgrade or uninstall Websoft9, if you use no-root user you can `sudo su` for it
|
||||
|
||||
## Install & Upgrade
|
||||
|
||||
```
|
||||
# Install by default
|
||||
|
@ -48,7 +50,7 @@ wget -O - https://websoft9.github.io/websoft9/install/install.sh | bash /dev/std
|
|||
```
|
||||
After installation, access it by: **http://Internet IP:9000** and using **Linux user** for login
|
||||
|
||||
# Uninstall
|
||||
## Uninstall
|
||||
|
||||
```
|
||||
# Uninstall by default
|
||||
|
|
|
@ -63,12 +63,16 @@ while [[ $# -gt 0 ]]; do
|
|||
done
|
||||
|
||||
# 输出参数值
|
||||
echo "Your installation parameters are as follows: "
|
||||
echo -e "\n------ Welcome to install Websoft9, it will take 3-5 minutes ------"
|
||||
echo -e "\nYour installation parameters are as follows: "
|
||||
echo "--version: $version"
|
||||
echo "--port: $port"
|
||||
echo "--channel: $channel"
|
||||
echo "--path: $path"
|
||||
|
||||
echo -e "\nYour OS: "
|
||||
cat /etc/os-release | head -n 3 2>/dev/null
|
||||
|
||||
# Define global vars
|
||||
# export var can send it to subprocess
|
||||
|
||||
|
@ -107,8 +111,6 @@ Wait_apt() {
|
|||
export -f Wait_apt
|
||||
|
||||
|
||||
|
||||
|
||||
install_tools(){
|
||||
echo_prefix_tools=$'\n[Tools] - '
|
||||
echo "$echo_prefix_tools Starting install necessary tool..."
|
||||
|
@ -252,11 +254,16 @@ EOF
|
|||
set_docker(){
|
||||
echo "Set Docker for Websoft9 backend service..."
|
||||
merge_json_files
|
||||
if ! docker network inspect websoft9 > /dev/null 2>&1; then
|
||||
sudo systemctl stop firewalld 2> /dev/null
|
||||
sudo docker network create websoft9
|
||||
sudo systemctl restart docker
|
||||
if ! systemctl is-active --quiet firewalld; then
|
||||
echo "firewalld is not running"
|
||||
else
|
||||
echo "Set firewall for Docker..."
|
||||
sudo sudo firewall-cmd --permanent --new-zone=docker 2> /dev/null
|
||||
sudo firewall-cmd --permanent --zone=docker --add-interface=docker0 2> /dev/null
|
||||
sudo firewall-cmd --permanent --zone=docker --set-target=ACCEPT
|
||||
sudo firewall-cmd --reload
|
||||
fi
|
||||
sudo systemctl restart docker
|
||||
}
|
||||
|
||||
install_backends() {
|
||||
|
@ -339,8 +346,6 @@ install_systemd() {
|
|||
|
||||
|
||||
#--------------- main-----------------------------------------
|
||||
|
||||
echo "------ Welcome to install Websoft9, it will take 3-5 minutes ------"
|
||||
check_ports $http_port $https_port $cockpit_port
|
||||
install_tools
|
||||
download_source
|
||||
|
@ -365,4 +370,6 @@ fi
|
|||
|
||||
install_backends
|
||||
install_systemd
|
||||
echo "-- Install success! Access Websoft9 console by: http://Internet IP:$cockpit_port and using Linux user for login ------"
|
||||
|
||||
echo -e "\n-- Install success! ------"
|
||||
echo "Access Websoft9 console by: http://Internet IP:$(grep ListenStream /lib/systemd/system/cockpit.socket | cut -d= -f2) and using Linux user for login"
|
|
@ -81,11 +81,12 @@ cockpit_exist() {
|
|||
|
||||
if cockpit_exist && [ -n "${cockpit_port// }" ]; then
|
||||
cockpit_port=$(grep -oP "(?<=^ListenStream=).*" "/lib/systemd/system/cockpit.socket")
|
||||
echo "$cockpit_port at cockpit.socket"
|
||||
fi
|
||||
|
||||
if [ -z "${cockpit_port// }" ]; then
|
||||
cockpit_port=$port
|
||||
echo "Maintain original port: $cockpit_port"
|
||||
echo "Confirm the port: $cockpit_port"
|
||||
fi
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue