mirror of
https://github.com/YunoHost-Apps/teampass_ynh.git
synced 2024-09-03 20:26:37 +02:00
Correction
This commit is contained in:
parent
65bfd925a7
commit
ac31f5dfd6
2 changed files with 61 additions and 3 deletions
|
@ -20,9 +20,9 @@ sudo cp ../conf/nginx.conf /etc/nginx/conf.d/$domain.d/$app.conf
|
||||||
sudo rm -r $final_path/install
|
sudo rm -r $final_path/install
|
||||||
|
|
||||||
# Modifie les variables dans le fichier de configuration nginx
|
# Modifie les variables dans le fichier de configuration nginx
|
||||||
sudo sed -i "s@__PATH__@$path@g" /etc/nginx/conf.d/$domain.d/$app.conf
|
sudo sed -i "s@__PATHTOCHANGE__@$path@g" /etc/nginx/conf.d/$domain.d/$app.conf
|
||||||
sudo sed -i "s@NAMETOCHANGE@$app@g" /etc/nginx/conf.d/$domain.d/$app.conf
|
sudo sed -i "s@__WWWPATH__@$final_path@g" /etc/nginx/conf.d/$domain.d/$app.conf
|
||||||
sudo sed -i "s@__PORT__@$port@g" /etc/nginx/conf.d/$domain.d/$app.conf
|
sudo sed -i "s@__NAMETOCHANGE__@$app@g" /etc/nginx/conf.d/$domain.d/$app.conf
|
||||||
|
|
||||||
# Créer le fichier de configuration du pool php-fpm et le configure.
|
# Créer le fichier de configuration du pool php-fpm et le configure.
|
||||||
sed -i "s@__NAMETOCHANGE__@$app@g" ../conf/php-fpm.conf
|
sed -i "s@__NAMETOCHANGE__@$app@g" ../conf/php-fpm.conf
|
||||||
|
|
58
scripts/upgrade~
Normal file
58
scripts/upgrade~
Normal file
|
@ -0,0 +1,58 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Récupère les infos de l'application.
|
||||||
|
app=teampass
|
||||||
|
domain=$(sudo yunohost app setting $app domain)
|
||||||
|
path=$(sudo yunohost app setting $app path)
|
||||||
|
final_path=$(sudo yunohost app setting $app final_path)
|
||||||
|
|
||||||
|
|
||||||
|
# Décompresse la source
|
||||||
|
tar -x -f ../sources/teampass.tar.gz
|
||||||
|
# Copie les fichiers sources
|
||||||
|
sudo cp -a teampass/. "$final_path"
|
||||||
|
# Copie les fichiers additionnels ou modifiés.
|
||||||
|
sudo cp -a ../sources/ajouts/. "$final_path"
|
||||||
|
# Et copie le fichier de config nginx
|
||||||
|
sudo cp ../conf/nginx.conf /etc/nginx/conf.d/$domain.d/$app.conf
|
||||||
|
|
||||||
|
# Delete the install directory.
|
||||||
|
sudo rm -r $final_path/install
|
||||||
|
|
||||||
|
# Modifie les variables dans le fichier de configuration nginx
|
||||||
|
sudo sed -i "s@__PATH__@$path@g" /etc/nginx/conf.d/$domain.d/$app.conf
|
||||||
|
sudo sed -i "s@NAMETOCHANGE@$app@g" /etc/nginx/conf.d/$domain.d/$app.conf
|
||||||
|
sudo sed -i "s@__PORT__@$port@g" /etc/nginx/conf.d/$domain.d/$app.conf
|
||||||
|
|
||||||
|
# Créer le fichier de configuration du pool php-fpm et le configure.
|
||||||
|
sed -i "s@__NAMETOCHANGE__@$app@g" ../conf/php-fpm.conf
|
||||||
|
sed -i "s@__FINALPATH__@$final_path@g" ../conf/php-fpm.conf
|
||||||
|
finalphpconf=/etc/php5/fpm/pool.d/$app.conf
|
||||||
|
sudo cp ../conf/php-fpm.conf $finalphpconf
|
||||||
|
sudo chown root: $finalphpconf
|
||||||
|
finalphpini=/etc/php5/fpm/conf.d/20-$app.ini
|
||||||
|
sudo cp ../conf/php-fpm.ini $finalphpini
|
||||||
|
sudo chown root: $finalphpini
|
||||||
|
sudo service php5-fpm reload
|
||||||
|
|
||||||
|
# sudo chown www-data: -R $final_path
|
||||||
|
# sudo chmod 770 -R $final_path
|
||||||
|
# sudo find $final_path -type f -print0 | xargs -0 sudo chmod 740 # Applique les permissions sur les fichiers seulement (rwxr-----)
|
||||||
|
# sudo chmod 770 -R $final_path/files $final_path/upload
|
||||||
|
# sudo chmod a+x $final_path/CsvToXml_For_Teampass.sh
|
||||||
|
|
||||||
|
sudo find $final_path -type f -print0 | xargs -0 sudo chmod 640
|
||||||
|
# drwxr-x--- sur les dossiers
|
||||||
|
sudo find $final_path -type d -print0 | xargs -0 sudo chmod 750
|
||||||
|
# Les dossiers files et upload ont besoin d'un droit d'écriture.
|
||||||
|
sudo chmod 770 -R $final_path/files $final_path/upload
|
||||||
|
# Le script de conversion csv xml doit être exécutable, au moins par root.
|
||||||
|
sudo chmod 740 $final_path/CsvToXml_For_Teampass.sh
|
||||||
|
# Les fichiers appartiennent à root et sont lisibles par www-data
|
||||||
|
sudo chown -R root:www-data $final_path
|
||||||
|
|
||||||
|
|
||||||
|
# Recharge la configuration Nginx
|
||||||
|
sudo service nginx reload
|
||||||
|
# Régénère la configuration de SSOwat
|
||||||
|
sudo yunohost app ssowatconf
|
Loading…
Reference in a new issue