mirror of
https://github.com/YunoHost-Apps/dotclear2_ynh.git
synced 2024-09-03 18:26:29 +02:00
use ynh_add_config, remove ynh_permission_update in upgrade script
This commit is contained in:
parent
b3c6048718
commit
0f5758cc2f
3 changed files with 3 additions and 9 deletions
|
@ -14,7 +14,7 @@
|
||||||
"email": "pierre@kayou.io"
|
"email": "pierre@kayou.io"
|
||||||
},
|
},
|
||||||
"requirements": {
|
"requirements": {
|
||||||
"yunohost": ">= 4.2.4"
|
"yunohost": ">= 4.3.2"
|
||||||
},
|
},
|
||||||
"multi_instance": true,
|
"multi_instance": true,
|
||||||
"services": [
|
"services": [
|
||||||
|
|
|
@ -134,8 +134,7 @@ ynh_replace_string --match_string="'DC_ADMIN_URL', ''" --replace_string="'DC_ADM
|
||||||
ynh_replace_string --match_string="'DC_ADMIN_MAILFROM', ''" --replace_string="'DC_ADMIN_MAILFROM', '$email'" --target_file=$php_config
|
ynh_replace_string --match_string="'DC_ADMIN_MAILFROM', ''" --replace_string="'DC_ADMIN_MAILFROM', '$email'" --target_file=$php_config
|
||||||
|
|
||||||
# Adding LDAP login
|
# Adding LDAP login
|
||||||
cp ../conf/class.auth.ldap.php $final_path/inc/class.auth.ldap.php
|
ynh_add_config --template="../conf/class.auth.ldap.php" --destination="$final_path/inc/class.auth.ldap.php"
|
||||||
ynh_replace_string --match_string="__APP__" --replace_string="$app" --target_file="$final_path/inc/class.auth.ldap.php"
|
|
||||||
|
|
||||||
cat << EOF >> $php_config
|
cat << EOF >> $php_config
|
||||||
|
|
||||||
|
|
|
@ -164,8 +164,7 @@ ynh_replace_string --match_string="'DC_ADMIN_URL', ''" --replace_string="'DC_ADM
|
||||||
ynh_replace_string --match_string="'DC_ADMIN_MAILFROM', ''" --replace_string="'DC_ADMIN_MAILFROM', '$email'" --target_file=$php_config
|
ynh_replace_string --match_string="'DC_ADMIN_MAILFROM', ''" --replace_string="'DC_ADMIN_MAILFROM', '$email'" --target_file=$php_config
|
||||||
|
|
||||||
# Adding LDAP login
|
# Adding LDAP login
|
||||||
cp ../conf/class.auth.ldap.php $final_path/inc/class.auth.ldap.php
|
ynh_add_config --template="../conf/class.auth.ldap.php" --destination="$final_path/inc/class.auth.ldap.php"
|
||||||
ynh_replace_string "__APP__" "$app" $final_path/inc/class.auth.ldap.php
|
|
||||||
|
|
||||||
cat << EOF >> $php_config
|
cat << EOF >> $php_config
|
||||||
|
|
||||||
|
@ -183,14 +182,10 @@ chown $app:$app "$php_config"
|
||||||
# UPDATING DATABASE
|
# UPDATING DATABASE
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
ynh_permission_update --permission "admin" --add "visitors"
|
|
||||||
|
|
||||||
# Navigate to the admin panel to upgrade the database: https://dotclear.org/documentation/2.0/admin/upgrades
|
# Navigate to the admin panel to upgrade the database: https://dotclear.org/documentation/2.0/admin/upgrades
|
||||||
adminUrl="/admin/auth.php"
|
adminUrl="/admin/auth.php"
|
||||||
ynh_local_curl $adminUrl
|
ynh_local_curl $adminUrl
|
||||||
|
|
||||||
ynh_permission_update --permission "admin" --remove "visitors"
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# GENERIC FINALIZATION
|
# GENERIC FINALIZATION
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
Loading…
Reference in a new issue