Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Replaced sed by ynh_add_nginx_config
  • Loading branch information
Olivier BILHAUT authored and scith committed Feb 6, 2018
1 parent 4d73ccb commit 128c0bf
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 12 deletions.
9 changes: 4 additions & 5 deletions hooks/post_user_create
Expand Up @@ -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
4 changes: 2 additions & 2 deletions manifest.json
Expand Up @@ -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"
Expand Down
12 changes: 7 additions & 5 deletions scripts/install
Expand Up @@ -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
Expand Down

0 comments on commit 128c0bf

Please sign in to comment.