From 128c0bf96b55b4e7b56aeb74f40654156652d077 Mon Sep 17 00:00:00 2001 From: Olivier BILHAUT Date: Mon, 29 Jan 2018 17:06:38 +0100 Subject: [PATCH] Replaced sed by ynh_add_nginx_config --- hooks/post_user_create | 9 ++++----- manifest.json | 4 ++-- scripts/install | 12 +++++++----- 3 files changed, 13 insertions(+), 12 deletions(-) diff --git a/hooks/post_user_create b/hooks/post_user_create index a9b62cc..0e1dd73 100644 --- a/hooks/post_user_create +++ b/hooks/post_user_create @@ -5,10 +5,9 @@ user=YNH_USER member=YNH_MEMBER # Sync users - sudo sudo -u www-data php $src_path/scripts/user/sync_users_ldap2dolibarr.php commitiferror --server=localhost -y +sudo -u www-data php $src_path/scripts/user/sync_users_ldap2dolibarr.php commitiferror --server=localhost -y # If YNH users should also be members, sync members - if [ $member = 1 ]; - then - sudo sudo -u www-data php $src_path/scripts/members/sync_members_ldap2dolibarr.php commitiferror 1 --server=localhost -y - fi +if [ $member = 1 ] ; then + sudo sudo -u www-data php $src_path/scripts/members/sync_members_ldap2dolibarr.php commitiferror 1 --server=localhost -y +fi diff --git a/manifest.json b/manifest.json index 485c3d5..4e5e4ac 100644 --- a/manifest.json +++ b/manifest.json @@ -9,8 +9,8 @@ "url": "https://www.dolibarr.org/", "license": "free", "maintainer": { - "name": "scith", - "url": "https://github.com/scith" + "name": "poilou", + "url": "https://github.com/labiloute" }, "requirements": { "yunohost": ">> 2.7.0" diff --git a/scripts/install b/scripts/install index a0a9364..ab8974b 100644 --- a/scripts/install +++ b/scripts/install @@ -99,11 +99,13 @@ ynh_webpath_register $app $domain $path_url ynh_mysql_create_db "$dbname" "$dbuser" "$dbpass" # Modify Nginx configuration file and copy it to Nginx conf directory - nginx_conf=../conf/nginx.conf - sed -i "s@__PATH__@${path_url}@g" $nginx_conf - sed -i "s@__FINALPATH__@$src_path/htdocs/@g" $nginx_conf - sed -i "s@__NAME__@$app@g" $nginx_conf - sudo cp $nginx_conf /etc/nginx/conf.d/$domain.d/$app.conf +# nginx_conf=../conf/nginx.conf +# sed -i "s@__PATH__@${path_url}@g" $nginx_conf +# sed -i "s@__FINALPATH__@$src_path/htdocs/@g" $nginx_conf +# sed -i "s@__NAME__@$app@g" $nginx_conf +# sudo cp $nginx_conf /etc/nginx/conf.d/$domain.d/$app.conf + + ynh_add_nginx_config # PHP sed -i "s@YNH_WWW_APP@$app@g" ../conf/php-fpm.conf