mirror of
https://github.com/YunoHost-Apps/matrix-appservice-irc_ynh.git
synced 2024-09-03 19:36:37 +02:00
common code
This commit is contained in:
parent
5eff3b0d4a
commit
76b83da390
3 changed files with 27 additions and 25 deletions
|
@ -7,12 +7,36 @@
|
||||||
# dependencies used by the app
|
# dependencies used by the app
|
||||||
pkg_dependencies="postgresql"
|
pkg_dependencies="postgresql"
|
||||||
|
|
||||||
nodejs_version=14
|
nodejs_version=18
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# PERSONAL HELPERS
|
# PERSONAL HELPERS
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
|
__ynh_register_synapse_app_service() {
|
||||||
|
$final_path/bin/matrix-appservice-irc -r \
|
||||||
|
-c $final_path/config.yaml \
|
||||||
|
-u "http://localhost:$port" \
|
||||||
|
-f $final_path/appservice-registration-irc.yaml
|
||||||
|
|
||||||
|
ynh_store_file_checksum --file=$final_path/appservice-registration-irc.yaml
|
||||||
|
|
||||||
|
# This appservice needs it to be duplicated…
|
||||||
|
cp $final_path/appservice-registration-irc.yaml /etc/matrix-$synapse_instance/app-service/$app.yaml
|
||||||
|
|
||||||
|
/opt/yunohost/matrix-$synapse_instance/update_synapse_for_appservice.sh \
|
||||||
|
|| ynh_die "Synapse can't restart with the appservice configuration"
|
||||||
|
}
|
||||||
|
|
||||||
|
# TODO:
|
||||||
|
__ynh_register_dendrite_app_service() {
|
||||||
|
:
|
||||||
|
}
|
||||||
|
|
||||||
|
__ynh_register_matrix_app_service() {
|
||||||
|
__ynh_register_synapse_app_service
|
||||||
|
}
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# EXPERIMENTAL HELPERS
|
# EXPERIMENTAL HELPERS
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -137,18 +137,7 @@ chown $app:$app "$final_path/passkey.pem"
|
||||||
# REGISTER SYNAPSE APP-SERVICE
|
# REGISTER SYNAPSE APP-SERVICE
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
$final_path/bin/matrix-appservice-irc -r \
|
__ynh_register_matrix_app_service
|
||||||
-c $final_path/config.yaml \
|
|
||||||
-u "http://localhost:$port" \
|
|
||||||
-f $final_path/appservice-registration-irc.yaml
|
|
||||||
|
|
||||||
ynh_store_file_checksum --file=$final_path/appservice-registration-irc.yaml
|
|
||||||
|
|
||||||
# This appservice needs it to be duplicated…
|
|
||||||
cp $final_path/appservice-registration-irc.yaml /etc/matrix-$synapse_instance/app-service/$app.yaml
|
|
||||||
|
|
||||||
/opt/yunohost/matrix-$synapse_instance/update_synapse_for_appservice.sh \
|
|
||||||
|| ynh_die "Synapse can't restart with the appservice configuration"
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# SETUP SYSTEMD
|
# SETUP SYSTEMD
|
||||||
|
|
|
@ -135,18 +135,7 @@ chown $app:$app "$final_path/config.yaml"
|
||||||
|
|
||||||
ynh_backup_if_checksum_is_different --file=$final_path/appservice-registration-irc.yaml
|
ynh_backup_if_checksum_is_different --file=$final_path/appservice-registration-irc.yaml
|
||||||
|
|
||||||
$final_path/bin/matrix-appservice-irc -r \
|
__ynh_register_matrix_app_service
|
||||||
-c $final_path/config.yaml \
|
|
||||||
-u "http://localhost:$port" \
|
|
||||||
-f $final_path/appservice-registration-irc.yaml
|
|
||||||
|
|
||||||
ynh_store_file_checksum --file=$final_path/appservice-registration-irc.yaml
|
|
||||||
|
|
||||||
# This appservice needs it to be duplicated…
|
|
||||||
cp $final_path/appservice-registration-irc.yaml /etc/matrix-$synapse_instance/app-service/$app.yaml
|
|
||||||
|
|
||||||
/opt/yunohost/matrix-$synapse_instance/update_synapse_for_appservice.sh \
|
|
||||||
|| ynh_die "Synapse can't restart with the appservice configuration"
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# SETUP SYSTEMD
|
# SETUP SYSTEMD
|
||||||
|
|
Loading…
Add table
Reference in a new issue