Commit 6eee1602 authored by Michel Memeteau's avatar Michel Memeteau

Merge branch 'release/1.1'

parents 722a4921 9a14fd34
# Instructions to install libre.sh on linux with Systemd
## Recommendation
- Systemd (debian 8 or debian 9, CentOS 7 ...)
- Systemd distro (ubuntu server 18.04.3 or debian 9 )
# Installation
Where basicly reproduce what the user_data do for us.
as root
# configure sshd
# configure sshd (Optional)
Don't forget to create the user core and adding your ssh key before
You could also remove AllowUsers core or/and change the username.
......@@ -25,7 +25,7 @@ chmod 600 /etc/ssh/sshd_config
systemctl restart sshd
```
# add kernel parameter
# add kernel parameter (optional but recommended )
```
cat > /etc/sysctl.d/libresh.conf <<EOF
......@@ -39,7 +39,7 @@ sysctl -p /etc/sysctl.d/libresh.conf
echo never > /sys/kernel/mm/transparent_hugepage/enabled
```
# define Localhost
# define Localhost (should not be needed but... )
```
cat > /etc/hosts <<EOF
......@@ -74,6 +74,10 @@ MAIL_PORT=587
EOF
```
# install docker
*Current tested version : 19.03.5 see https://docs.docker.com/install/linux/docker-ce/ubuntu/ .*
# install docker-compose
*Remark I did a variante to find the last version of DockerCompose and download it*
......@@ -88,8 +92,8 @@ chmod +x /opt/bin/docker-compose
```
git clone https://lab.libreho.st/libre.sh/compose.libre.sh /libre.sh &&\
mkdir /{data,system} &&\
mkdir /data/trash &&\
mkdir -p /{data,system} &&\
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 &&\
......
# libre.sh
# libre.sh Version 1.1
[![Backers on Open Collective](https://opencollective.com/libresh/backers/badge.svg)](#backers)
[![Sponsors on Open Collective](https://opencollective.com/libresh/sponsors/badge.svg)](#sponsors)
......
......@@ -91,10 +91,10 @@ case "$1" in
cd /data/domains
tar cvzf ${2}.tgz ./${2}
if [ -f ./${2}.tgz ]; then
if [ ! -d /data/domains/to_keep/ ]; then
mkdir /data/domains/to_keep/
if [ ! -d /data/trash/ ]; then
mkdir /data/trash/
fi
mv ${2}.tgz /data/domains/to_keep/
mv ${2}.tgz /data/trash/
rm -rf /data/domains/${2}
rm -rf /system/haproxy/certs/${2}
rm /system/haproxy/haproxy/certs/${2}.pem
......
......@@ -117,9 +117,10 @@ function application () {
export MAIL_HOST="mail.indie.host"
export MAIL_PORT="587"
else
export MAIL_PASS=`tr -dc A-Za-z0-9_ < /dev/urandom | head -c 20 | xargs`
export MAIL_USER="noreply.${arg_u}@${MAIL_DOMAIN}"
/opt/bin/add_mailbox ${MAIL_USER} ${MAIL_PASS}
echo "using MAIL_DOMAIN from server env"
#export MAIL_PASS=`tr -dc A-Za-z0-9_ < /dev/urandom | head -c 20 | xargs`
#export MAIL_USER="noreply.${arg_u}@${MAIL_DOMAIN}"
#/opt/bin/add_mailbox ${MAIL_USER} ${MAIL_PASS}
fi
./scripts/install
fi
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment