diff --git a/scripts/install b/scripts/install index bc52038..70667b9 100644 --- a/scripts/install +++ b/scripts/install @@ -1,5 +1,8 @@ #! /bin/bash +# causes the shell to exit if any subcommand or pipeline returns a non-zero status +set -e + #retrieve arguments domain=$1 path=$2 @@ -70,15 +73,15 @@ sudo cp ../conf/nginx.conf /etc/nginx/conf.d/$domain.d/$app.conf # If app is private, remove url to SSOWat conf from skipped_uris if [ "$is_public" = "No" ]; then - sudo yunohost app setting $app unprotected_uris -d + # Redirect to SSOwat login in + sudo yunohost app setting $app unprotected_uris -d +else + sudo yunohost app setting $app unprotected_uris -v "/" fi # Adding admin to the allowed users sudo yunohost app addaccess $app -u $admin -# Allow only allowed users to access admin panel -sudo yunohost app setting bozon protected_uris -v "index.php?p=login" - # Restart services sudo service nginx reload sudo yunohost app ssowatconf diff --git a/scripts/remove b/scripts/remove index db66f1b..ec2ffca 100644 --- a/scripts/remove +++ b/scripts/remove @@ -1,5 +1,8 @@ #! /bin/bash +# causes the shell to exit if any subcommand or pipeline returns a non-zero status +set -e + app=bozon domain=$(sudo yunohost app setting $app domain) diff --git a/scripts/restore b/scripts/restore index e1bcb12..aaf3910 100644 --- a/scripts/restore +++ b/scripts/restore @@ -1,5 +1,8 @@ #! /bin/bash +# causes the shell to exit if any subcommand or pipeline returns a non-zero status +set -e + # definie useful vars app=bozon parent_path=/var/www diff --git a/scripts/upgrade b/scripts/upgrade index 223f4c6..515b160 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -1,5 +1,8 @@ #! /bin/bash +# causes the shell to exit if any subcommand or pipeline returns a non-zero status +set -e + app=bozon parent_path=/var/www final_path=$parent_path/$app