diff --git a/.gitignore b/.gitignore index 4cbf1e47..b0db5958 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ .pnpm-debug.log .env* +data/ github.secrets node_modules/ app-data/* diff --git a/VERSION b/VERSION index 9325c3cc..a2268e2d 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.3.0 \ No newline at end of file +0.3.1 \ No newline at end of file diff --git a/package.json b/package.json index 3186e2b1..29452b13 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "runtipi", - "version": "0.3.0", + "version": "0.3.1", "description": "A homeserver for everyone", "scripts": { "test": "jest", diff --git a/packages/dashboard/package.json b/packages/dashboard/package.json index 180c6057..5c7db246 100644 --- a/packages/dashboard/package.json +++ b/packages/dashboard/package.json @@ -1,6 +1,6 @@ { "name": "dashboard", - "version": "0.3.0", + "version": "0.3.1", "private": true, "scripts": { "test": "jest --colors", diff --git a/packages/system-api/package.json b/packages/system-api/package.json index 456107a4..36ec69a4 100644 --- a/packages/system-api/package.json +++ b/packages/system-api/package.json @@ -1,6 +1,6 @@ { "name": "system-api", - "version": "0.3.0", + "version": "0.3.1", "description": "", "exports": "./dist/server.js", "type": "module", diff --git a/scripts/configure.sh b/scripts/configure.sh index e3e4ba35..b95d5b77 100755 --- a/scripts/configure.sh +++ b/scripts/configure.sh @@ -1,6 +1,4 @@ #!/usr/bin/env bash -set -e # Exit immediately if a command exits with a non-zero status. - ROOT_FOLDER="$(readlink -f "$(dirname "${BASH_SOURCE[0]}")"/..)" echo @@ -16,6 +14,7 @@ echo function install_docker() { local os="${1}" + echo "Installing docker for os ${os}" >/dev/tty if [[ "${OS}" == "debian" ]]; then sudo apt-get update @@ -25,7 +24,7 @@ function install_docker() { echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list >/dev/null sudo apt-get update sudo apt-get install -y docker-ce docker-ce-cli containerd.io docker-compose-plugin - echo "sucess" + return 0 elif [[ "${OS}" == "ubuntu" ]]; then sudo apt-get update sudo apt-get install -y ca-certificates curl gnupg jq lsb-release @@ -34,21 +33,21 @@ function install_docker() { echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list >/dev/null sudo apt-get update sudo apt-get install -y docker-ce docker-ce-cli containerd.io docker-compose-plugin - echo "sucess" + return 0 elif [[ "${OS}" == "centos" ]]; then sudo yum install -y yum-utils jq sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo sudo yum install -y --allowerasing docker-ce docker-ce-cli containerd.io docker-compose-plugin sudo systemctl start docker sudo systemctl enable docker - echo "sucess" + return 0 elif [[ "${OS}" == "fedora" ]]; then sudo dnf -y install dnf-plugins-core jq sudo dnf config-manager --add-repo https://download.docker.com/linux/fedora/docker-ce.repo sudo dnf -y install docker-ce docker-ce-cli containerd.io docker-compose-plugin sudo systemctl start docker sudo systemctl enable docker - echo "sucess" + return 0 elif [[ "${OS}" == "arch" ]]; then sudo pacman -Sy --noconfirm docker jq sudo systemctl start docker.service @@ -59,9 +58,9 @@ function install_docker() { systemctl enable --now cronie.service fi - echo "sucess" + return 0 else - echo "error" + return 1 fi } @@ -71,17 +70,20 @@ SUB_OS="$(cat /etc/[A-Za-z]*[_-][rv]e[lr]* | grep "^ID_LIKE=" | cut -d= -f2 | un if command -v docker >/dev/null; then echo "Docker is already installed" else - echo "Installing Docker" - DOCKER_SUCCESS=$(install_docker "${OS}") - if [[ "${DOCKER_SUCCESS}" == "sucess" ]]; then + install_docker "${OS}" + docker_result=$? + + if [[ docker_result -eq 0 ]]; then echo "docker installed" else - DOCKER_SUCCESS=$(install_docker "${SUB_OS}") + echo "Your system ${OS} is not supported trying with sub_os ${SUB_OS}" + install_docker "${SUB_OS}" + docker_sub_result=$? - if [[ "${DOCKER_SUCCESS}" == "sucess" ]]; then + if [[ docker_sub_result -eq 0 ]]; then echo "docker installed" else - echo "Your system ${OS} is not supported please install docker manually" + echo "Your system ${SUB_OS} is not supported please install docker manually" exit 1 fi fi