1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/prestashop_ynh.git synced 2024-09-03 20:06:39 +02:00

Fix bug dans .fonctions

This commit is contained in:
magikcypress 2017-03-11 23:05:32 +01:00
parent 78a2ad0954
commit 203a62b842
2 changed files with 26 additions and 6 deletions

View file

@ -85,11 +85,31 @@ POOL_FPM () { # Créer le fichier de configuration du pool php-fpm et le configu
sudo service php5-fpm reload
}
YNH_CURL () {
data_post=$1
url_access=$2
sleep 1
SUPPRESS_WARNING curl -kL -H \"Host: $domain\" --resolve $domain:443:127.0.0.1 --data \"$data_post\" \"https://localhost$path_url$url_access\"
EXIT_PROPERLY () { # Causes the script to stop in the event of an error. And clean the residue.
trap '' ERR
echo -e "\e[91m \e[1m" # Shell in light red bold
echo -e "!!\n $app install's script has encountered an error. Installation was cancelled.\n!!" >&2
if type -t CLEAN_SETUP > /dev/null; then # Checks the existence of the function before executing it.
CLEAN_SETUP # Call the specific cleanup function of the install script.
fi
# Compensates the ssowat bug that does not remove the app's input in case of installation error.
sudo sed -i "\@\"$domain$path/\":@d" /etc/ssowat/conf.json
if [ "$ynh_version" = "2.2" ]; then
/bin/bash $script_dir/remove
fi
ynh_die
}
TRAP_ON () { # Activate signal capture
trap EXIT_PROPERLY ERR # Capturing exit signals on error
}
TRAP_OFF () { # Ignoring signal capture until TRAP_ON
trap '' ERR # Ignoring exit signals
}
#=================================================

View file

@ -18,7 +18,7 @@ source /usr/share/yunohost/helpers
# MANAGE FAILURE OF THE SCRIPT
#=================================================
ynh_check_error # Active trap pour arrêter le script si une erreur est détectée.
TRAP_ON # Active trap to stop the script if an error is detected.
#=================================================
# RETRIEVE ARGUMENTS FROM THE MANIFEST