Commit 178fbde9 authored by Michel Memeteau's avatar Michel Memeteau

Merge branch '189-add-app-admin-email-as-argument-in-provision' into 'develop'

Resolve "Add app admin email as argument in provision"

See merge request !190
parents 11185c4a 61b28985
#Current version of to be installed
# System env vars : can be overrided by a values.env file next to this install file
......@@ -52,6 +52,10 @@ MAIL_PASS=
# Default admin emails for apps
### TODO : source a setting file is present to override defaults
echo "-------- Welcome to $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 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 clone ${git_url} -b ${arg_t} /data/domains/${arg_u}
cd /data/domains/${arg_u}
if [ -f ./scripts/install ]; then
export URL=${arg_u}
export URL=${arg_u}
#admin email
if [ -z "${arg_e}" ]; then
warning "No admin_email specified with -e , using default hoster email"
export ADMIN_EMAIL=${arg_e}
debug " admin email is ${ADMIN_EMAIL} "
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 to be abble to create email accounts."
......@@ -148,6 +152,7 @@ function application () {
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