|
@@ -85,11 +85,31 @@ POOL_FPM () { # Créer le fichier de configuration du pool php-fpm et le configu
|
|
|
sudo service php5-fpm reload
|
|
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
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
#=================================================
|
|
#=================================================
|