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:
parent
7834e2ddc5
commit
0af43ec257
1 changed files with 4 additions and 7 deletions
|
@ -3,6 +3,8 @@
|
||||||
# Exit on command errors and treat unset variables as an error
|
# Exit on command errors and treat unset variables as an error
|
||||||
set -eu
|
set -eu
|
||||||
|
|
||||||
|
source .fonctions # Charge les fonctions génériques habituellement utilisées dans le script
|
||||||
|
|
||||||
# See comments in install script
|
# See comments in install script
|
||||||
app=$YNH_APP_INSTANCE_NAME
|
app=$YNH_APP_INSTANCE_NAME
|
||||||
|
|
||||||
|
@ -30,6 +32,8 @@ final_path=/var/www/$app
|
||||||
|
|
||||||
db_name=$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
|
# Modify Nginx configuration file and copy it to Nginx conf directory
|
||||||
sed -i "s@PATHTOCHANGE@$path@g" ../conf/nginx.conf*
|
sed -i "s@PATHTOCHANGE@$path@g" ../conf/nginx.conf*
|
||||||
sed -i "s@ALIASTOCHANGE@$final_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" ];
|
if [ $is_public = "Yes" ];
|
||||||
then
|
then
|
||||||
sudo cp ../conf/nginx.conf-public /etc/nginx/conf.d/$domain.d/$app.conf
|
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
|
else
|
||||||
sudo cp ../conf/nginx.conf /etc/nginx/conf.d/$domain.d/$app.conf
|
sudo cp ../conf/nginx.conf /etc/nginx/conf.d/$domain.d/$app.conf
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue