Fix restore script (#2)

* Remove warning as POST_INSTALL serves this purpose now

* Add missing nodejs installation on restore

* Change autoupdate strategy. (#3)

---------

Co-authored-by: orhtej2 <2871798+orhtej2@users.noreply.github.com>
This commit is contained in:
Salamandar 2023-09-21 01:02:39 +02:00 committed by GitHub
parent bf54552149
commit 8d6e23a1e9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 5 deletions

View file

@ -83,8 +83,7 @@ ram.runtime = "1024M"
[resources.sources.main] [resources.sources.main]
url = "https://github.com/matrix-org/matrix-appservice-irc/archive/refs/tags/1.0.1.tar.gz" url = "https://github.com/matrix-org/matrix-appservice-irc/archive/refs/tags/1.0.1.tar.gz"
sha256 = "ac58ca1e7ed1a496b0ec69cd7079f67c2e3ad5007f24bdacd63fc992cc442ce3" sha256 = "ac58ca1e7ed1a496b0ec69cd7079f67c2e3ad5007f24bdacd63fc992cc442ce3"
autoupdate.strategy = "latest_github_release" autoupdate.strategy = "latest_github_tag"
autoupdate.asset = "*.tar.gz"
[resources.system_user] [resources.system_user]
home = "/opt/yunohost/__APP__" home = "/opt/yunohost/__APP__"

View file

@ -114,9 +114,6 @@ ynh_script_progression --message="Starting a systemd service..." --weight=1
# Start a systemd service # Start a systemd service
ynh_systemd_action --service_name="$app" --action="start" --log_path="/var/log/$app/$app.log" --line_match="Error: No IRC servers specified." ynh_systemd_action --service_name="$app" --action="start" --log_path="/var/log/$app/$app.log" --line_match="Error: No IRC servers specified."
ynh_print_warn "The bridge is successfully configured but non working yet!"
ynh_print_warn "You need to edit the file $install_dir/config.yaml to add IRC networks."
#================================================= #=================================================
# END OF SCRIPT # END OF SCRIPT
#================================================= #=================================================

View file

@ -15,6 +15,14 @@ server_name=$(ynh_app_setting_get --app=$app --key=server_name)
synapse_db_name="matrix_$synapse_instance" synapse_db_name="matrix_$synapse_instance"
bot_synapse_db_user="@$botname:$server_name" bot_synapse_db_user="@$botname:$server_name"
#=================================================
# INSTALL DEPENDENCIES
#=================================================
ynh_script_progression --message="Installing NodeJS..." --weight=1
ynh_install_nodejs --nodejs_version=$nodejs_version
ynh_use_nodejs
#================================================= #=================================================
# RESTORE THE APP MAIN DIR # RESTORE THE APP MAIN DIR
#================================================= #=================================================