mirror of
https://github.com/YunoHost-Apps/hubzilla_ynh.git
synced 2024-09-03 19:26:21 +02:00
cleaning
This commit is contained in:
parent
e7f23ed569
commit
84e154099c
4 changed files with 26 additions and 37 deletions
|
@ -92,3 +92,12 @@ error_reporting(E_ERROR | E_WARNING | E_PARSE );
|
|||
ini_set('error_log','php.log');
|
||||
ini_set('log_errors','1');
|
||||
ini_set('display_errors', '0');
|
||||
|
||||
|
||||
App::$config['system']['addon'] = 'ldapauth';
|
||||
|
||||
App::$config['ldapauth']['ldap_server'] = 'localhost';
|
||||
App::$config['ldapauth']['ldap_searchdn'] = 'ou=users,dc=yunohost,dc=org';
|
||||
App::$config['ldapauth']['ldap_userattr'] = 'uid';
|
||||
App::$config['ldapauth']['ldap_autocreateaccount_emailattribute'] = 'mail';
|
||||
App::$config['ldapauth']['create_account'] = '1';
|
||||
|
|
|
@ -1,7 +0,0 @@
|
|||
App::$config['system']['addon'] = 'ldapauth';
|
||||
|
||||
App::$config['ldapauth']['ldap_server'] = 'localhost';
|
||||
App::$config['ldapauth']['ldap_searchdn'] = 'ou=users,dc=yunohost,dc=org';
|
||||
App::$config['ldapauth']['ldap_userattr'] = 'uid';
|
||||
App::$config['ldapauth']['ldap_autocreateaccount_emailattribute'] = 'mail';
|
||||
App::$config['ldapauth']['create_account'] = '1';
|
|
@ -36,11 +36,6 @@ ynh_app_setting_set --app=$app --key=fpm_usage --value=$fpm_usage
|
|||
#=================================================
|
||||
# CREATE A DATABASE
|
||||
#=================================================
|
||||
|
||||
|
||||
#=================================================
|
||||
# CREATE A MYSQL DATABASE
|
||||
#=================================================
|
||||
ynh_script_progression --message="Creating a database..." --weight=2
|
||||
|
||||
db_name=$(ynh_sanitize_dbid --db_name=$app)
|
||||
|
@ -109,10 +104,6 @@ ynh_script_progression --message="Adding a configuration file..." --weight=1
|
|||
|
||||
ynh_add_config --template="../conf/htconfig.sample.php" --destination="$install_dir/.htconfig.php"
|
||||
|
||||
# addon ldap config
|
||||
ynh_script_progression --message="Push LDAP configuration to .htconfig.php..."
|
||||
|
||||
cat ../conf/ldap_conf.php >> $install_dir/.htconfig.php
|
||||
ynh_store_file_checksum --file=$install_dir/.htconfig.php
|
||||
|
||||
chmod 600 "$install_dir/.htconfig.php"
|
||||
|
|
|
@ -93,31 +93,27 @@ ynh_add_nginx_config
|
|||
#=================================================
|
||||
# UPDATE A CONFIG FILE
|
||||
#=================================================
|
||||
ynh_script_progression --message="Updating a configuration file..." --weight=1
|
||||
# ynh_script_progression --message="Updating a configuration file..." --weight=1
|
||||
|
||||
if [ $database = "mysql" ]; then
|
||||
db_type=0
|
||||
db_name=$(ynh_sanitize_dbid --db_name=$app)
|
||||
db_user=$db_name
|
||||
db_pwd=$(ynh_app_setting_get --app=$app --key=mysqlpwd)
|
||||
# Change your databases character set and collation
|
||||
ynh_mysql_connect_as --user=$db_user --password="$db_pwd" --database=$db_name \
|
||||
<<< "ALTER DATABASE $db_name CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;"
|
||||
elif [ $database = "postgresql" ]; then
|
||||
db_type=1
|
||||
db_pwd=$(ynh_app_setting_get --app=$app --key=psqlpwd)
|
||||
fi
|
||||
# if [ $database = "mysql" ]; then
|
||||
# db_type=0
|
||||
# db_name=$(ynh_sanitize_dbid --db_name=$app)
|
||||
# db_user=$db_name
|
||||
# db_pwd=$(ynh_app_setting_get --app=$app --key=mysqlpwd)
|
||||
# # Change your databases character set and collation
|
||||
# ynh_mysql_connect_as --user=$db_user --password="$db_pwd" --database=$db_name \
|
||||
# <<< "ALTER DATABASE $db_name CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;"
|
||||
# elif [ $database = "postgresql" ]; then
|
||||
# db_type=1
|
||||
# db_pwd=$(ynh_app_setting_get --app=$app --key=psqlpwd)
|
||||
# fi
|
||||
|
||||
ynh_add_config --template="../conf/htconfig.sample.php" --destination="$install_dir/.htconfig.php"
|
||||
# ynh_add_config --template="../conf/htconfig.sample.php" --destination="$install_dir/.htconfig.php"
|
||||
|
||||
# addon ldap config
|
||||
ynh_script_progression --message="Push LDAP configuration to .htconfig.php..."
|
||||
# ynh_store_file_checksum --file=$install_dir/.htconfig.php
|
||||
|
||||
cat ../conf/ldap_conf.php >> $install_dir/.htconfig.php
|
||||
ynh_store_file_checksum --file=$install_dir/.htconfig.php
|
||||
|
||||
chmod 600 "$install_dir/.htconfig.php"
|
||||
chown $app:$app "$install_dir/.htconfig.php"
|
||||
# chmod 600 "$install_dir/.htconfig.php"
|
||||
# chown $app:$app "$install_dir/.htconfig.php"
|
||||
|
||||
#=================================================
|
||||
# UPGRADE CRON JOB
|
||||
|
|
Loading…
Add table
Reference in a new issue