1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/abantecart_ynh.git synced 2024-09-03 18:06:16 +02:00

set -eu & ynh_die

This commit is contained in:
polytan02 2017-02-24 23:57:56 +00:00
parent 783ad1e1c9
commit 351a285a4a
3 changed files with 5 additions and 2 deletions

View file

@ -1,4 +1,5 @@
#!/bin/bash #!/bin/bash
set -eu
# Source app helpers # Source app helpers
source /usr/share/yunohost/helpers source /usr/share/yunohost/helpers

View file

@ -1,4 +1,5 @@
#!/bin/bash #!/bin/bash
set -eu
# Source app helpers # Source app helpers
source /usr/share/yunohost/helpers source /usr/share/yunohost/helpers
@ -14,14 +15,14 @@ db_pass=$(ynh_app_setting_get $app db_pass)
if [ -d $final_path ]; then if [ -d $final_path ]; then
echo "There is already a directory: $final_path " >&2 echo "There is already a directory: $final_path " >&2
exit 1 ynh_die
fi fi
# Restore Nginx # Restore Nginx
conf=/etc/nginx/conf.d/$domain.d/$app.conf conf=/etc/nginx/conf.d/$domain.d/$app.conf
if [ -f $conf ]; then if [ -f $conf ]; then
echo "There is already a nginx conf file at this path: $conf " >&2 echo "There is already a nginx conf file at this path: $conf " >&2
exit 1 ynh_die
fi fi
sudo cp -a ./nginx.conf $conf sudo cp -a ./nginx.conf $conf

View file

@ -1,4 +1,5 @@
#!/bin/bash #!/bin/bash
set -eu
source .fonctions # Charge les fonctions génériques habituellement utilisées dans le script source .fonctions # Charge les fonctions génériques habituellement utilisées dans le script