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

add_config

This commit is contained in:
ericgaspar 2021-09-25 13:14:04 +02:00
parent 788df7fdaf
commit b5d4e9f264
No known key found for this signature in database
GPG key ID: 574F281483054D44
2 changed files with 3 additions and 10 deletions

View file

@ -1,6 +1,6 @@
#!/bin/bash
app=__APP__
src_path=__SRCPATH__
src_path=__FINALPATH__
member=__MEMBER__
# Sync users

View file

@ -118,14 +118,7 @@ ynh_add_nginx_config
# PREPARE AND INSTALL APP
#=================================================
finstall="$final_path/htdocs/install/install.forced.php"
cp ../conf/install.forced.php "$finstall"
# Change variables in Dolibarr configuration
ynh_replace_string --match_string="__DB_NAME__" --replace_string="$db_name" --target_file="$finstall"
ynh_replace_string --match_string="__DB_USER__" --replace_string="$db_user" --target_file="$finstall"
ynh_replace_string --match_string="__DB_PWD__" --replace_string="$db_pwd" --target_file="$finstall"
ynh_replace_string --match_string="__ADMIN__" --replace_string="$admin" --target_file="$finstall"
ynh_add_config --template="/conf/install.forced.php" --destination="$final_path/htdocs/install/install.forced.php"
#=================================================
# CONFIGURE THE HOOK FILE FOR USER CREATE
@ -133,7 +126,7 @@ ynh_replace_string --match_string="__ADMIN__" --replace_string="$admin" --target
fhook=../hooks/post_user_create
ynh_replace_string --match_string="__APP__" --replace_string="$app" --target_file="$fhook"
ynh_replace_string --match_string="__MEMBER__" --replace_string="$member" --target_file="$fhook"
ynh_replace_string --match_string="__SRCPATH__" --replace_string="$final_path" --target_file="$fhook"
ynh_replace_string --match_string="__FINALPATH__" --replace_string="$final_path" --target_file="$fhook"
#=================================================
# SETUP APPLICATION WITH CURL