diff --git a/install.linux.sh b/install.linux.sh index 8b5051d9d18db1c929c9efb6db9386411822c6c2..381fcc284ed2c72d83f9a6d01fac41801f82db73 100755 --- a/install.linux.sh +++ b/install.linux.sh @@ -1,7 +1,7 @@ #!/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 diff --git a/utils/provision b/utils/provision index af27200eee78e4c108c95a1addd7b5c78b734a49..b54d766f4eb27c51f4d97fc70cc0e13de520eb38 100755 --- a/utils/provision +++ b/utils/provision @@ -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}