Commit 61b28985 authored by Michel Memeteau's avatar Michel Memeteau

export admin email ( default in etc env )

parent 11185c4a
#!/bin/bash
#Current version of libre.sh to be installed
LIBRE_VERSION=187-repo-mode-to-retrieve-application-recipe
LIBRE_VERSION=develop
# System env vars : can be overrided by a values.env file next to this install file
......@@ -52,6 +52,10 @@ MAIL_PASS=
MAIL_HOST=mail.indie.host
MAIL_PORT=587
# Default admin emails for apps
ADMIN_EMAIL=support@ekimia.fr
### TODO : source a setting file is present to override defaults
echo "-------- Welcome to libre.sh $LIBRE_VERSION installer"
......@@ -79,6 +83,8 @@ echo "MAIL_HOST=${MAIL_HOST}" >> /etc/environment
echo "MAIL_PORT=${MAIL_PORT}" >> /etc/environment
echo "ADMIN_EMAIL=${ADMIN_EMAIL}" >> /etc/environment
# STEP Install Docker
......
......@@ -28,6 +28,7 @@ read -r -d '' usage <<-'EOF'
-u [arg] URL to process. Required.
-a [arg] Application to install. (in the form github.com/indiehosters/wordpress or wordpress in REPO_MODE)
-t [arg] Checkout a specific tag or branch from the application repo. default to master
-e [arg] Specify the email of the application admin
-s Start the application right away.
-b Buys the associated domain name.
-i Configure OpenDKIM.
......@@ -117,18 +118,21 @@ function application () {
#Define the tag/branch
if [ "${arg_t}" = "1" ]; then
warning "No tag/branch specified, Using master "
git_tag=master
else
git_tag=${arg_t}
fi
git clone ${git_url} -b ${arg_t} /data/domains/${arg_u}
cd /data/domains/${arg_u}
if [ -f ./scripts/install ]; then
export URL=${arg_u}
#domain
export URL=${arg_u}
#admin email
if [ -z "${arg_e}" ]; then
warning "No admin_email specified with -e , using default hoster email"
else
export ADMIN_EMAIL=${arg_e}
debug " admin email is ${ADMIN_EMAIL} "
fi
if [ -z ${MAIL_DOMAIN:-} ]; then
warning "you have no email server setup, we'll print a random configuration in your application. Make sure to check the parameters for your app to send proper emails."
warning "To stop having this warning, please configure your libre.sh to be abble to create email accounts."
......@@ -148,6 +152,7 @@ function application () {
fi
}
function start () {
systemctl start u@${arg_u}
systemctl enable u@${arg_u}
......
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