mirror of
https://github.com/YunoHost-Apps/xbackbone_ynh.git
synced 2024-09-03 19:15:53 +02:00
Merge pull request #9 from haydenwalker980/master
Fixed subdomain installations
This commit is contained in:
commit
ffd09c3e46
3 changed files with 34 additions and 2 deletions
27
conf/config-subdomain.php
Normal file
27
conf/config-subdomain.php
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
return array(
|
||||||
|
'base_url' => 'https://__DOMAIN__',
|
||||||
|
'db' => array (
|
||||||
|
'connection' => 'mysql',
|
||||||
|
'dsn' => 'host=localhost;port=3306;dbname=__DB_NAME__',
|
||||||
|
'username' => '__DB_NAME__',
|
||||||
|
'password' => '__DB_PWD__',
|
||||||
|
),
|
||||||
|
|
||||||
|
'storage' => array(
|
||||||
|
'driver' => 'local',
|
||||||
|
'path' => '__DATA_DIR__',
|
||||||
|
),
|
||||||
|
|
||||||
|
'ldap' => array(
|
||||||
|
'enabled' => true,
|
||||||
|
'schema' => 'ldap',
|
||||||
|
'host' => 'ldap://127.0.0.1',
|
||||||
|
'port' => 389,
|
||||||
|
'base_domain' => 'dc=yunohost,dc=org',
|
||||||
|
'search_filter' => '(&(|(objectclass=posixAccount))(uid={{username}})(permission=cn=__APP__.main,ou=permission,dc=yunohost,dc=org))',
|
||||||
|
'user_domain' => 'ou=Users',
|
||||||
|
'rdn_attribute' => 'uid=',
|
||||||
|
),
|
||||||
|
);
|
|
@ -36,7 +36,11 @@ ynh_add_nginx_config
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Adding a configuration file..." --weight=1
|
ynh_script_progression --message="Adding a configuration file..." --weight=1
|
||||||
|
|
||||||
ynh_add_config --template="config.php" --destination="$install_dir/config.php"
|
if [ "$path" == "/" ]; then
|
||||||
|
ynh_add_config --template="../conf/config-subdomain.php" --destination="$install_dir/config.php"
|
||||||
|
else
|
||||||
|
ynh_add_config --template="../conf/config-withpath.php" --destination="$install_dir/config.php"
|
||||||
|
fi
|
||||||
|
|
||||||
chmod 400 "$install_dir/config.php"
|
chmod 400 "$install_dir/config.php"
|
||||||
chown $app:$app "$install_dir/config.php"
|
chown $app:$app "$install_dir/config.php"
|
||||||
|
@ -47,7 +51,7 @@ chown $app:$app "$install_dir/config.php"
|
||||||
ynh_script_progression --message="Install database" --weight=1
|
ynh_script_progression --message="Install database" --weight=1
|
||||||
|
|
||||||
pushd $install_dir
|
pushd $install_dir
|
||||||
php$phpversion bin/migrate --install
|
php$phpversion bin/migrate --install
|
||||||
popd
|
popd
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -55,3 +59,4 @@ popd
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
ynh_script_progression --message="Installation of $app completed" --last
|
ynh_script_progression --message="Installation of $app completed" --last
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue