diff --git a/README.md b/README.md index 97f07392..0f0381c5 100644 --- a/README.md +++ b/README.md @@ -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 -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 diff --git a/install/install.sh b/install/install.sh index ca625416..49317911 100644 --- a/install/install.sh +++ b/install/install.sh @@ -77,6 +77,7 @@ export https_port=443 export cockpit_port=$port export force_install=$force export install_path=$path +export channel export systemd_path="/opt/websoft9/systemd" export source_zip="websoft9-latest.zip" export source_unzip="websoft9" @@ -191,7 +192,19 @@ install_backends() { exit 1 fi fi + + container_names=$(docker ps -a --format "{{.Names}}" --filter "name=websoft9") 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 up -d if [ $? -ne 0 ]; then diff --git a/install/install_plugins.sh b/install/install_plugins.sh index 227858fa..3640d46b 100644 --- a/install/install_plugins.sh +++ b/install/install_plugins.sh @@ -39,9 +39,11 @@ if [ -z "$install_path" ]; then install_path="/data/websoft9/source" fi +echo "$echo_prefix_plugins Starting dowload plugin and update it" echo "Your installation parameters are as follows: " echo "--channel: $channel" +echo "--install_path: $install_path" artifact_url="https://w9artifact.blob.core.windows.net/$channel/websoft9/plugin" echo_prefix_plugins=$'\n[Plugins] - ' @@ -51,8 +53,6 @@ versions_url="$source_github_pages/version.json" file_suffix=".zip" plugin_path="/usr/share/cockpit" -echo "$echo_prefix_plugins Starting dowload plugin and update it" - python3 - << END import requests import json