From b8a05f30697e2741f5cf006b4ac81dbea30f1f02 Mon Sep 17 00:00:00 2001 From: Maniack Crudelis Date: Fri, 5 Aug 2016 21:20:14 +0200 Subject: [PATCH] Correction upgrade --- scripts/upgrade | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index 3978e8a..eeb4613 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -30,14 +30,6 @@ then sudo mv /usr/local/radicale /opt/yunohost/ fi -# Set permissions to radicale directory -sudo grep radicale /etc/passwd > /dev/null 2>&1 -if [ $? != 0 ]; -then - sudo useradd radicale -d /opt/yunohost/$app -fi -sudo chown radicale: -R /opt/yunohost/$app - # Upgrade pip packages sudo rm -Rf /opt/yunohost/$app sudo virtualenv /opt/yunohost/$app @@ -66,7 +58,7 @@ CHECK_MD5_CONFIG "logging" "/etc/$app/logging" # Créé un backup du fichier de sudo cp ../conf/logging /etc/$app/ STORE_MD5_CONFIG "logging" "/etc/$app/logging" # Réenregistre la somme de contrôle du fichier de config sudo sed -i "s@__PATH__@$path@g" /etc/$app/config -sudo sed -i "s@__FINALPATH__@$path@g" /etc/$app/config +sudo sed -i "s@__FINALPATH__@$final_path@g" /etc/$app/config STORE_MD5_CONFIG "config" "/etc/$app/config" # Réenregistre la somme de contrôle du fichier de config if [ "$infcloud" = "1" ] then #Configuration InfCloud @@ -138,6 +130,14 @@ then POOL_FPM # Créer le fichier de configuration du pool php-fpm et le configure. fi +# Set permissions to radicale directory +sudo grep radicale /etc/passwd > /dev/null 2>&1 +if [ $? != 0 ]; +then + sudo useradd radicale -d /opt/yunohost/$app +fi +sudo chown radicale: -R /opt/yunohost/$app + # Fix permission sudo chmod 755 /etc/$app/ sudo find /opt/yunohost/$app/ -type d -exec chmod 2755 {} \;