This commit is contained in:
Darren 2023-09-27 15:28:02 +08:00 committed by GitHub
parent 3131412315
commit 79d3aa0a25
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 16 additions and 3 deletions

View file

@ -44,7 +44,7 @@ curl https://websoft9.github.io/websoft9/install/install.sh | bash
# install Websoft9 development version and install path at /data/websoft9/source # install Websoft9 development version and install path at /data/websoft9/source
curl https://websoft9.github.io/websoft9/install/install.sh | bash --port 9000 --channel dev --path "/data/websoft9/source" wget https://websoft9.github.io/websoft9/install/install.sh && bash install.sh --port 9000 --channel dev --path "/data/websoft9/source"
``` ```
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

View file

@ -77,6 +77,7 @@ export https_port=443
export cockpit_port=$port export cockpit_port=$port
export force_install=$force export force_install=$force
export install_path=$path export install_path=$path
export channel
export systemd_path="/opt/websoft9/systemd" export systemd_path="/opt/websoft9/systemd"
export source_zip="websoft9-latest.zip" export source_zip="websoft9-latest.zip"
export source_unzip="websoft9" export source_unzip="websoft9"
@ -191,7 +192,19 @@ install_backends() {
exit 1 exit 1
fi fi
fi fi
container_names=$(docker ps -a --format "{{.Names}}" --filter "name=websoft9")
sudo docker compose down sudo docker compose down
# delete some dead containers that docker compose cannot deleted
if [ ! -z "$container_names" ]; then
echo "Deleting containers:"
echo $container_names
docker rm $container_names
else
echo "No containers to delete."
fi
sudo docker compose -p websoft9 pull sudo docker compose -p websoft9 pull
sudo docker compose -p websoft9 up -d sudo docker compose -p websoft9 up -d
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then

View file

@ -39,9 +39,11 @@ if [ -z "$install_path" ]; then
install_path="/data/websoft9/source" install_path="/data/websoft9/source"
fi fi
echo "$echo_prefix_plugins Starting dowload plugin and update it"
echo "Your installation parameters are as follows: " echo "Your installation parameters are as follows: "
echo "--channel: $channel" echo "--channel: $channel"
echo "--install_path: $install_path"
artifact_url="https://w9artifact.blob.core.windows.net/$channel/websoft9/plugin" artifact_url="https://w9artifact.blob.core.windows.net/$channel/websoft9/plugin"
echo_prefix_plugins=$'\n[Plugins] - ' echo_prefix_plugins=$'\n[Plugins] - '
@ -51,8 +53,6 @@ versions_url="$source_github_pages/version.json"
file_suffix=".zip" file_suffix=".zip"
plugin_path="/usr/share/cockpit" plugin_path="/usr/share/cockpit"
echo "$echo_prefix_plugins Starting dowload plugin and update it"
python3 - << END python3 - << END
import requests import requests
import json import json