Преглед изворни кода

Check if lsb_release is installed, adjust install doc ca-cert package.

Raphael Schneeberger пре 6 година
родитељ
комит
1df9423caa
2 измењених фајлова са 13 додато и 2 уклоњено
  1. 5 0
      README.md
  2. 8 2
      install/hst-install.sh

+ 5 - 0
README.md

@@ -46,6 +46,11 @@ Download the installation script for the latest release:
 ```bash
 ```bash
 wget https://raw.githubusercontent.com/hestiacp/hestiacp/release/install/hst-install.sh
 wget https://raw.githubusercontent.com/hestiacp/hestiacp/release/install/hst-install.sh
 ```
 ```
+If the download fails due to ssl validation, please be sure you've installed the requirement ca-certificate package - you can do this with the following command:
+```bash
+apt-get update && apt-get install ca-certificates
+```
+
 ## Step 3: Run
 ## Step 3: Run
 To begin the installation process, simply run the script and follow the on-screen prompts:
 To begin the installation process, simply run the script and follow the on-screen prompts:
 ```bash
 ```bash

+ 8 - 2
install/hst-install.sh

@@ -39,8 +39,14 @@ fi
 if [ -e "/etc/os-release" ]; then
 if [ -e "/etc/os-release" ]; then
     type=$(grep "^ID=" /etc/os-release | cut -f 2 -d '=')
     type=$(grep "^ID=" /etc/os-release | cut -f 2 -d '=')
     if [ "$type" = "ubuntu" ]; then
     if [ "$type" = "ubuntu" ]; then
-        release="$(lsb_release -s -r)"
-        VERSION='ubuntu'
+        # Check if lsb_release is installed
+        if [ -e '/usr/bin/lsb_release' ]; then
+            release="$(lsb_release -s -r)"
+            VERSION='ubuntu'            
+        else
+            echo "lsb_release is currently not installed, please install it:"
+            echo "apt-get update && apt-get install lsb_release"
+        fi
     elif [ "$type" = "debian" ]; then
     elif [ "$type" = "debian" ]; then
         release=$(cat /etc/debian_version|grep -o [0-9]|head -n1)
         release=$(cat /etc/debian_version|grep -o [0-9]|head -n1)
         VERSION='debian'
         VERSION='debian'