Skip to content
Snippets Groups Projects
Commit 7ae31dc1 authored by Michel Memeteau's avatar Michel Memeteau
Browse files

Merge branch 'develop' into 'master'

Updated linux install script

See merge request !196
parents 784a4025 76093025
No related branches found
No related tags found
1 merge request!196Updated linux install script
......@@ -9,6 +9,9 @@ LIBRE_VERSION=1.2
APP_REPO_URL="lab.libreho.st/libre.sh/compose"
## domain handling
### CONFIG : change to your domain vendor ( namecheap, ovh , scaleway, )
......@@ -88,13 +91,23 @@ echo "ADMIN_EMAIL=${ADMIN_EMAIL}" >> /etc/environment
# STEP Install Docker
echo "-------- Install latest docker "
# TODO : Fix a version for docker ?
name="docker-ce"
# TODO : Fix a version for docker ?
dpkg -s $name &> /dev/null
curl -fsSL https://get.docker.com -o get-docker.sh
sh get-docker.sh
if [ $? -ne 0 ]
then
echo "$name not installed"
apt-get update
curl -fsSL https://get.docker.com -o get-docker.sh
sh get-docker.sh
echo "-------- Latest docker installed "
else
echo "$name already installed"
fi
# STEP "install docker-compose"
echo "-------- Install latest docker-compose "
......@@ -106,13 +119,28 @@ dockerComposeVersion=$(curl -s https://api.github.com/repos/docker/compose/relea
curl -L https://github.com/docker/compose/releases/download/$dockerComposeVersion/docker-compose-`uname -s`-`uname -m` > /opt/bin/docker-compose &&\
chmod +x /opt/bin/docker-compose
# STEP "install git"
echo "-------- Install git"
distro=$( ( lsb_release -ds || cat /etc/*release || uname -om ) 2>/dev/null | head -n1 | cut -d " " -f1)
if [[ "$distro" == "Ubuntu" || "$distro" == "Debian" ]]; then
sudo apt-get install -y git
elif [[ "$distro" == "CentOS" || "$distro" == "AlmaLinux" || "$distro" == "Rocky" || "$distro" == "Fedora" ]]; then
yum install -y git
elif [[ "$distro" == "openSUSE" ]]; then
zypper install git
elif [[ "$distro" == "Arch" ]]; then
pacman -S git
elif [[ "$distro" == "Mageia" ]]; then
urpmi git
fi
# STEP install Libre.sh
echo "-------- installing libre.sh"
git clone https://lab.libreho.st/libre.sh/compose.libre.sh -b $LIBRE_VERSION /libre.sh
git clone https://lab.libreho.st/libre.sh/compose.libre.sh.git /libre.sh
mkdir -p /{data,system}
mkdir -p /data/trash
cp /libre.sh/unit-files/* /etc/systemd/system && systemctl daemon-reload
......@@ -133,4 +161,3 @@ chmod 644 /etc/profile.d/libre.sh
bash /etc/profile.d/libre.sh
#TODO : reload profile to use libre right away
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment