1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/spip_ynh.git synced 2024-09-03 20:25:59 +02:00

Inclure le fichier .fonctions

This commit is contained in:
magikcypress 2017-02-22 02:39:06 +01:00
parent 7834e2ddc5
commit 0af43ec257

View file

@ -3,6 +3,8 @@
# Exit on command errors and treat unset variables as an error
set -eu
source .fonctions # Charge les fonctions génériques habituellement utilisées dans le script
# See comments in install script
app=$YNH_APP_INSTANCE_NAME
@ -30,6 +32,8 @@ final_path=/var/www/$app
db_name=$app
CHECK_MD5_CONFIG "connect.php" "$final_path/config/connect.php" # Créé un backup du fichier de config si il a été modifié.
# Modify Nginx configuration file and copy it to Nginx conf directory
sed -i "s@PATHTOCHANGE@$path@g" ../conf/nginx.conf*
sed -i "s@ALIASTOCHANGE@$final_path/@g" ../conf/nginx.conf*
@ -37,13 +41,6 @@ sed -i "s@ALIASTOCHANGE@$final_path/@g" ../conf/nginx.conf*
if [ $is_public = "Yes" ];
then
sudo cp ../conf/nginx.conf-public /etc/nginx/conf.d/$domain.d/$app.conf
# grep -q "define('FORCE_SSL_ADMIN', true);" $final_path/config/connect.php
# if [[ ! $? -eq 0 ]];
# then
# echo "define('FORCE_SSL_ADMIN', true);" | sudo tee -a $final_path/config/connect.php
# else
# sudo sed -i "s@//define('FORCE_SSL_ADMIN@define('FORCE_SSL_ADMIN@g" $final_path/config/connect.php
# fi
else
sudo cp ../conf/nginx.conf /etc/nginx/conf.d/$domain.d/$app.conf
fi