From 48ed6c6d179ea05076dd263592514f6447b289a7 Mon Sep 17 00:00:00 2001 From: Michel Memeteau Date: Thu, 20 Feb 2020 18:00:50 +0100 Subject: [PATCH 1/3] Update install.linux.sh --- install.linux.sh | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/install.linux.sh b/install.linux.sh index 1595de8..a158ff3 100644 --- a/install.linux.sh +++ b/install.linux.sh @@ -1,13 +1,15 @@ #!/bin/bash -#Recommendation -- Systemd (debian > 8 , Ubuntu 16.04 , CentOS 7 ...) # System env vars ## domain handling -### change to your domain vendor ( ovh , online, ) +### TODO : Specify you template repo ROOT + +TEMPLATES_ROOT=lab.libreho.st/libre.sh/compose/ + +### TODO : change to your domain vendor ( ovh , online, ) DOMAIN_SERVER=namecheap ### Namecheap specific @@ -43,19 +45,29 @@ MAIL_PORT=587 echo "Welcome to libre.sh installer" echo "WIP" -echo " setting up system variables" + # STEP add kernel parameter -echo " Define environnement +# STEP Define environnement + +echo " setting up system variables" + # STEP "install docker-compose" +# TODO : Fix a version for docker compose ? + +mkdir -p /opt/bin &&\ +dockerComposeVersion=$(curl -s https://api.github.com/repos/docker/compose/releases/latest|grep tag_name|cut -d'"' -f4) &&\ +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 " installing libre.sh" # STEP install Libre.sh +echo " installing libre.sh" + git clone https://lab.libreho.st/libre.sh/compose.libre.sh /libre.sh mkdir -p /{data,system} mkdir /data/trash @@ -73,4 +85,4 @@ echo "3 - updating PATH" cat > /etc/profile.d/libre.sh < Date: Wed, 26 Feb 2020 09:40:36 +0100 Subject: [PATCH 2/3] First beta version of the script --- install.linux.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/install.linux.sh b/install.linux.sh index a158ff3..80f70f3 100644 --- a/install.linux.sh +++ b/install.linux.sh @@ -1,6 +1,7 @@ #!/bin/bash - +#Current version of libre.sh to be installed +LIBRE_VERSION=1.1 # System env vars ## domain handling @@ -81,7 +82,7 @@ cp /libre.sh/utils/* /opt/bin/ # STEP add /opt/bin path -echo "3 - updating PATH" +echo " - updating PATH" cat > /etc/profile.d/libre.sh < Date: Wed, 26 Feb 2020 15:55:14 +0100 Subject: [PATCH 3/3] Add docker install --- install.linux.sh | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) mode change 100644 => 100755 install.linux.sh diff --git a/install.linux.sh b/install.linux.sh old mode 100644 new mode 100755 index 80f70f3..a82575a --- a/install.linux.sh +++ b/install.linux.sh @@ -44,18 +44,29 @@ MAIL_PORT=587 -echo "Welcome to libre.sh installer" -echo "WIP" +echo "-------- Welcome to libre.sh $LIBRE_VERSION installer" # STEP add kernel parameter # STEP Define environnement -echo " setting up system variables" +echo "-------- setting up system variables" + + +# STEP Install Docker + +echo "-------- Install latest docker " +# TODO : Fix a version for docker ? + + +curl -fsSL https://get.docker.com -o get-docker.sh +sh get-docker.sh # STEP "install docker-compose" +echo "-------- Install latest docker-compose " + # TODO : Fix a version for docker compose ? mkdir -p /opt/bin &&\ @@ -67,11 +78,11 @@ chmod +x /opt/bin/docker-compose # STEP install Libre.sh -echo " installing libre.sh" +echo "-------- installing libre.sh" git clone https://lab.libreho.st/libre.sh/compose.libre.sh /libre.sh mkdir -p /{data,system} -mkdir /data/trash +mkdir -p /data/trash cp /libre.sh/unit-files/* /etc/systemd/system && systemctl daemon-reload systemctl enable web-net.service systemctl start web-net.service @@ -82,7 +93,7 @@ cp /libre.sh/utils/* /opt/bin/ # STEP add /opt/bin path -echo " - updating PATH" +echo "-------- updating PATH" cat > /etc/profile.d/libre.sh <