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

Improve pcheck and fix

This commit is contained in:
scith 2017-05-07 15:35:48 +02:00
parent 5cc9b9c96f
commit 4c94534862
2 changed files with 9 additions and 12 deletions

View file

@ -99,15 +99,15 @@ version=$(cat ../sources/version)
password=$(ynh_string_random 8)
# Install with CURL
curl -kL -H "Host: $domain" -X POST https://$domain$path/install/fileconf.php > /dev/null 2>&1
curl -kL -H "Host: $domain" -X POST https://$domain$path/install/step1.php --data "testpost=ok&action=set&selectlang=fr_FR" > /dev/null 2>&1
curl -kL -H "Host: $domain" -X POST https://$domain$path/install/step2.php --data "testpost=ok&action=set&dolibarr_main_db_character_set=latin1&dolibarr_main_db_collation=latin1_swedish_ci&selectlang=fr_FR" > /dev/null 2>&1
curl -kL -H "Host: $domain" -X POST https://$domain$path/install/step4.php --data "testpost=ok&action=set&selectlang=fr_FR" > /dev/null 2>&1
curl -kL -H "Host: $domain" -X POST https://$domain$path/install/step5.php --data "testpost=ok&action=set&selectlang=fr_FR&pass=$password&pass_verif=$password" > /dev/null 2>&1
curl -kL -H "Host: $domain" --resolve $domain:443:127.0.0.1 -X POST "https://$domain$path/install/fileconf.php" > /dev/null 2>&1
curl -kL -H "Host: $domain" --resolve $domain:443:127.0.0.1 -X POST "https://$domain$path/install/step1.php" --data "testpost=ok&action=set&selectlang=fr_FR" > /dev/null 2>&1
curl -kL -H "Host: $domain" --resolve $domain:443:127.0.0.1 -X POST "https://$domain$path/install/step2.php" --data "testpost=ok&action=set&dolibarr_main_db_character_set=latin1&dolibarr_main_db_collation=latin1_swedish_ci&selectlang=fr_FR" > /dev/null 2>&1
curl -kL -H "Host: $domain" --resolve $domain:443:127.0.0.1 -X POST "https://$domain$path/install/step4.php" --data "testpost=ok&action=set&selectlang=fr_FR" > /dev/null 2>&1
curl -kL -H "Host: $domain" --resolve $domain:443:127.0.0.1 -X POST "https://$domain$path/install/step5.php" --data "testpost=ok&action=set&selectlang=fr_FR&pass=$password&pass_verif=$password" > /dev/null 2>&1
# Populate the LDAP parameters
mysql -u ${dbuser} -p${dbpass} ${dbname} < ../conf/ldap.sql
# Populate the database with YNH users.
mysql -u ${dbuser} -p${dbpass} ${dbname} < ../conf/ldap_user.sql
sudo sudo -u www-data php $src_path/scripts/user/sync_users_ldap2dolibarr.php commitiferror --server=localhost -y
@ -129,5 +129,3 @@ version=$(cat ../sources/version)
# Setup hooks
sed -i "s@YNH_APP@$app@g" ../hooks/post_user_create
sed -i "s@YNH_MEMBER@$member@g" ../hooks/post_user_create
sed -i "s@YNH_APP@$app@g" ../hooks/post_user_delete
sed -i "s@YNH_MEMBER@$member@g" ../hooks/post_user_delete

View file

@ -19,7 +19,6 @@ version=$(cat ../sources/version)
# Download, unzip and copy source
sudo wget -q https://github.com/Dolibarr/dolibarr/archive/${version}.zip -O dolibarr-${version}.zip
sudo unzip -qq dolibarr-${version}.zip
sudo unzip -qq /tmp/dolibarr-${version}.zip
sudo cp -a dolibarr-${version}/. $src_path
# Modify Nginx configuration file and copy it to Nginx conf directory
@ -55,9 +54,9 @@ version=$(cat ../sources/version)
[[ -f $lock ]] && sudo rm $lock
# Upgrade with CURL
curl -kL -H "Host: $domain" "https://$domain$path/install/upgrade.php?action=upgrade&versionfrom=$old_version&versionto=$version" > /dev/null 2>&1
curl -kL -H "Host: $domain" -X POST "https://$domain$path/install/upgrade2.php?versionfrom=$old_version&versionto=$version" --data "testpost=ok&action=upgrade" > /dev/null 2>&1
curl -kL -H "Host: $domain" -X POST "https://$domain$path/install/step5.php?versionfrom=$old_version&versionto=$version" --data "testpost=ok&action=upgrade" > /dev/null 2>&1
curl -kL -H "Host: $domain" --resolve $domain:443:127.0.0.1 "https://$domain$path/install/upgrade.php?action=upgrade&versionfrom=$old_version&versionto=$version" > /dev/null 2>&1
curl -kL -H "Host: $domain" --resolve $domain:443:127.0.0.1 -X POST "https://$domain$path/install/upgrade2.php?versionfrom=$old_version&versionto=$version" --data "testpost=ok&action=upgrade" > /dev/null 2>&1
curl -kL -H "Host: $domain" --resolve $domain:443:127.0.0.1 -X POST "https://$domain$path/install/step5.php?versionfrom=$old_version&versionto=$version" --data "testpost=ok&action=upgrade" > /dev/null 2>&1
# Recreate the lock
sudo touch $lock