mirror of
https://github.com/YunoHost-Apps/pleroma_ynh.git
synced 2024-09-03 20:15:59 +02:00
Fix registration choice not taken into account
This commit is contained in:
parent
fdf6922dfc
commit
6ad1f63a61
3 changed files with 9 additions and 3 deletions
|
@ -6,7 +6,7 @@
|
||||||
"en": "A free, federated social networking server built on open protocols.",
|
"en": "A free, federated social networking server built on open protocols.",
|
||||||
"fr": "Un serveur de réseautage social fédéré et gratuit basé sur des protocoles ouverts."
|
"fr": "Un serveur de réseautage social fédéré et gratuit basé sur des protocoles ouverts."
|
||||||
},
|
},
|
||||||
"version": "2.4.4~ynh1",
|
"version": "2.4.4~ynh2",
|
||||||
"url": "https://pleroma.social/",
|
"url": "https://pleroma.social/",
|
||||||
"upstream": {
|
"upstream": {
|
||||||
"license": "AGPL-3.0-only",
|
"license": "AGPL-3.0-only",
|
||||||
|
|
|
@ -209,6 +209,8 @@ popd
|
||||||
cat "../conf/ldap.exs" >> "$config"
|
cat "../conf/ldap.exs" >> "$config"
|
||||||
|
|
||||||
ynh_replace_string --match_string="config :pleroma, configurable_from_database: false" --replace_string="config :pleroma, configurable_from_database: true" --target_file="$config"
|
ynh_replace_string --match_string="config :pleroma, configurable_from_database: false" --replace_string="config :pleroma, configurable_from_database: true" --target_file="$config"
|
||||||
|
registration_bool_value=`(($registration)) && echo "true" || echo "false"`
|
||||||
|
ynh_replace_string --match_string="registrations_open: true" --replace_string="registrations_open: $registration_bool_value" --target_file="$config"
|
||||||
|
|
||||||
pushd $final_path/live
|
pushd $final_path/live
|
||||||
ynh_exec_warn_less ynh_exec_as $app -s $SHELL -lc "$final_path/live/bin/pleroma_ctl migrate"
|
ynh_exec_warn_less ynh_exec_as $app -s $SHELL -lc "$final_path/live/bin/pleroma_ctl migrate"
|
||||||
|
|
|
@ -150,6 +150,7 @@ ynh_system_user_create --username=$app --home_dir="$final_path"
|
||||||
# UPGRADE TO OTP RELEASE
|
# UPGRADE TO OTP RELEASE
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
|
config="/etc/$app/config.exs"
|
||||||
if ynh_version_gt "1.1.1~ynh1" "${previous_version}" ; then
|
if ynh_version_gt "1.1.1~ynh1" "${previous_version}" ; then
|
||||||
ynh_script_progression --message="Upgrading to OTP release..." --weight=1
|
ynh_script_progression --message="Upgrading to OTP release..." --weight=1
|
||||||
|
|
||||||
|
@ -175,7 +176,6 @@ if ynh_version_gt "1.1.1~ynh1" "${previous_version}" ; then
|
||||||
|
|
||||||
mkdir -p /etc/$app
|
mkdir -p /etc/$app
|
||||||
chown -R $app /etc/$app
|
chown -R $app /etc/$app
|
||||||
config="/etc/$app/config.exs"
|
|
||||||
mv $final_path/live/config/prod.secret.exs $config
|
mv $final_path/live/config/prod.secret.exs $config
|
||||||
ynh_replace_string --match_string="use Mix.Config" --replace_string="import Config" --target_file="$config"
|
ynh_replace_string --match_string="use Mix.Config" --replace_string="import Config" --target_file="$config"
|
||||||
echo "config :pleroma, :instance, static_dir: \"/home/yunohost.app/$app/static\"" >> $config
|
echo "config :pleroma, :instance, static_dir: \"/home/yunohost.app/$app/static\"" >> $config
|
||||||
|
@ -187,11 +187,15 @@ if ynh_version_gt "1.1.1~ynh1" "${previous_version}" ; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ynh_version_gt "2.0.5~ynh1" "${previous_version}" ; then
|
if ynh_version_gt "2.0.5~ynh1" "${previous_version}" ; then
|
||||||
config="/etc/$app/config.exs"
|
|
||||||
cat "../conf/ldap.exs" >> "$config"
|
cat "../conf/ldap.exs" >> "$config"
|
||||||
ynh_replace_string --match_string="config :pleroma, configurable_from_database: false" --replace_string="config :pleroma, configurable_from_database: true" --target_file="$config"
|
ynh_replace_string --match_string="config :pleroma, configurable_from_database: false" --replace_string="config :pleroma, configurable_from_database: true" --target_file="$config"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if ynh_version_gt "2.4.4~ynh2" "${previous_version}"; then
|
||||||
|
registration_bool_value=`(($registration)) && echo "true" || echo "false"`
|
||||||
|
ynh_replace_string --match_string='registrations_open: true' --replace_string="registrations_open: $registration_bool_value" --target_file="$config"
|
||||||
|
fi
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
Loading…
Add table
Reference in a new issue