1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/dolibarr_ynh.git synced 2024-09-03 18:35:53 +02:00

Replaced sed by ynh_add_nginx_config

This commit is contained in:
Olivier BILHAUT 2018-01-29 17:06:38 +01:00 committed by Jeff
parent 4d73ccbc8d
commit 128c0bf96b
3 changed files with 13 additions and 12 deletions

View file

@ -5,10 +5,9 @@ user=YNH_USER
member=YNH_MEMBER member=YNH_MEMBER
# Sync users # 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 YNH users should also be members, sync members
if [ $member = 1 ]; if [ $member = 1 ] ; then
then sudo sudo -u www-data php $src_path/scripts/members/sync_members_ldap2dolibarr.php commitiferror 1 --server=localhost -y
sudo sudo -u www-data php $src_path/scripts/members/sync_members_ldap2dolibarr.php commitiferror 1 --server=localhost -y fi
fi

View file

@ -9,8 +9,8 @@
"url": "https://www.dolibarr.org/", "url": "https://www.dolibarr.org/",
"license": "free", "license": "free",
"maintainer": { "maintainer": {
"name": "scith", "name": "poilou",
"url": "https://github.com/scith" "url": "https://github.com/labiloute"
}, },
"requirements": { "requirements": {
"yunohost": ">> 2.7.0" "yunohost": ">> 2.7.0"

View file

@ -99,11 +99,13 @@ ynh_webpath_register $app $domain $path_url
ynh_mysql_create_db "$dbname" "$dbuser" "$dbpass" ynh_mysql_create_db "$dbname" "$dbuser" "$dbpass"
# Modify Nginx configuration file and copy it to Nginx conf directory # Modify Nginx configuration file and copy it to Nginx conf directory
nginx_conf=../conf/nginx.conf # nginx_conf=../conf/nginx.conf
sed -i "s@__PATH__@${path_url}@g" $nginx_conf # sed -i "s@__PATH__@${path_url}@g" $nginx_conf
sed -i "s@__FINALPATH__@$src_path/htdocs/@g" $nginx_conf # sed -i "s@__FINALPATH__@$src_path/htdocs/@g" $nginx_conf
sed -i "s@__NAME__@$app@g" $nginx_conf # sed -i "s@__NAME__@$app@g" $nginx_conf
sudo cp $nginx_conf /etc/nginx/conf.d/$domain.d/$app.conf # sudo cp $nginx_conf /etc/nginx/conf.d/$domain.d/$app.conf
ynh_add_nginx_config
# PHP # PHP
sed -i "s@YNH_WWW_APP@$app@g" ../conf/php-fpm.conf sed -i "s@YNH_WWW_APP@$app@g" ../conf/php-fpm.conf