1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/akkoma_ynh.git synced 2024-09-03 20:36:17 +02:00

Adjust setting setup operation order

Cf. https://github.com/YunoHost-Apps/akkoma_ynh/pull/8#issuecomment-1381280734
This commit is contained in:
lapineige 2023-01-14 11:23:35 +01:00 committed by GitHub
parent ca43f5b0f2
commit 322acba44f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -232,6 +232,13 @@ ynh_store_file_checksum --file="$config"
chmod 400 "$config"
chown $app:$app "$config"
ynh_script_progression --message="Configure admin UI to allow it to change setting..." --weight=1
# Correct path to 'static dir' in DB
# This must be done when Akkoma is running (i.e. after install and start)
ynh_exec_warn_less ynh_exec_as $app -s $SHELL -lc "$final_path/live/bin/pleroma_ctl config migrate_to_db"
# allow configuration from the admin UI
ynh_replace_string --match_string="configurable_from_database: false" --replace_string="configurable_from_database: true" --target_file="$config"
#=================================================
# GENERIC FINALIZATION
#=================================================
@ -276,17 +283,6 @@ ynh_systemd_action --service_name=nginx --action=reload
#=================================================
# POST INSTALL
#=================================================
ynh_script_progression --message="Configure admin UI to allow it to change setting..." --weight=1
# Correct path to 'static dir' in DB
# This must be done when Akkoma is running (i.e. after install and start)
ynh_exec_warn_less ynh_exec_as $app -s $SHELL -lc "$final_path/live/bin/pleroma_ctl config migrate_to_db"
# allow configuration from the admin UI
ynh_exec_warn_less ynh_exec_as $app -s $SHELL -lc "sed -i 's/configurable_from_database: false/configurable_from_database: true/' $config"
# restart Akkoma for the new setting to take effect
ynh_systemd_action --service_name=$app --action="restart" --log_path=systemd
#=================================================
# INSTALL BASIC FRONTENDS
#=================================================