This commit is contained in:
Darren 2023-10-08 11:27:06 +08:00 committed by GitHub
parent 2763e0c928
commit 6db2e3ca44
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 24 additions and 14 deletions

View file

@ -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 systems hardware, Inspect and interact with systemd-based services, - Manage your Linux by GUI: Inspect and change network settings, Configure a firewall, Manage storage, Browse and search system logs, Inspect a systems hardware, Inspect and interact with systemd-based services,
- Supported languages: English, Chinese中文 - 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 # 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 After installation, access it by: **http://Internet IP:9000** and using **Linux user** for login
# Uninstall ## Uninstall
``` ```
# Uninstall by default # Uninstall by default

View file

@ -63,12 +63,16 @@ while [[ $# -gt 0 ]]; do
done 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 "--version: $version"
echo "--port: $port" echo "--port: $port"
echo "--channel: $channel" echo "--channel: $channel"
echo "--path: $path" echo "--path: $path"
echo -e "\nYour OS: "
cat /etc/os-release | head -n 3 2>/dev/null
# Define global vars # Define global vars
# export var can send it to subprocess # export var can send it to subprocess
@ -107,8 +111,6 @@ Wait_apt() {
export -f Wait_apt export -f Wait_apt
install_tools(){ install_tools(){
echo_prefix_tools=$'\n[Tools] - ' echo_prefix_tools=$'\n[Tools] - '
echo "$echo_prefix_tools Starting install necessary tool..." echo "$echo_prefix_tools Starting install necessary tool..."
@ -252,11 +254,16 @@ EOF
set_docker(){ set_docker(){
echo "Set Docker for Websoft9 backend service..." echo "Set Docker for Websoft9 backend service..."
merge_json_files merge_json_files
if ! docker network inspect websoft9 > /dev/null 2>&1; then if ! systemctl is-active --quiet firewalld; then
sudo systemctl stop firewalld 2> /dev/null echo "firewalld is not running"
sudo docker network create websoft9 else
sudo systemctl restart docker 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 fi
sudo systemctl restart docker
} }
install_backends() { install_backends() {
@ -339,8 +346,6 @@ install_systemd() {
#--------------- main----------------------------------------- #--------------- main-----------------------------------------
echo "------ Welcome to install Websoft9, it will take 3-5 minutes ------"
check_ports $http_port $https_port $cockpit_port check_ports $http_port $https_port $cockpit_port
install_tools install_tools
download_source download_source
@ -365,4 +370,6 @@ fi
install_backends install_backends
install_systemd 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"

View file

@ -81,11 +81,12 @@ cockpit_exist() {
if cockpit_exist && [ -n "${cockpit_port// }" ]; then if cockpit_exist && [ -n "${cockpit_port// }" ]; then
cockpit_port=$(grep -oP "(?<=^ListenStream=).*" "/lib/systemd/system/cockpit.socket") cockpit_port=$(grep -oP "(?<=^ListenStream=).*" "/lib/systemd/system/cockpit.socket")
echo "$cockpit_port at cockpit.socket"
fi fi
if [ -z "${cockpit_port// }" ]; then if [ -z "${cockpit_port// }" ]; then
cockpit_port=$port cockpit_port=$port
echo "Maintain original port: $cockpit_port" echo "Confirm the port: $cockpit_port"
fi fi