1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/mautrix_whatsapp_ynh.git synced 2024-09-03 19:46:01 +02:00

Change go path and restart synapse with read registration rights

This is the standard debian golang installation path
Restart synapse after rights to registration file given
This commit is contained in:
Gredin67 2020-04-15 19:53:26 +02:00 committed by GitHub
parent a8ef3b9f81
commit 91bffb059a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -135,12 +135,12 @@ ynh_install_app_dependencies $pkg_dependencies
# INSTALL GO # INSTALL GO
#================================================= #=================================================
type /usr/local/go/bin/go > /dev/null || { type /usr/lib/go/bin/go > /dev/null || {
ynh_script_progression --message="Installing go..." --time --weight=1 ynh_script_progression --message="Installing go..." --time --weight=1
wget https://dl.google.com/go/go$GO_VERSION.linux-$architecture.tar.gz -q wget https://dl.google.com/go/go$GO_VERSION.linux-$architecture.tar.gz -q
tar -C /usr/local -xzf go$GO_VERSION.linux-$architecture.tar.gz tar -C /usr/lib -xzf go$GO_VERSION.linux-$architecture.tar.gz
} }
export PATH=$PATH:/usr/local/go/bin export PATH=$PATH:/usr/lib/go/bin
#================================================= #=================================================
# CREATE A POSTGRESQL DATABASE # CREATE A POSTGRESQL DATABASE
@ -332,10 +332,6 @@ fi
ynh_replace_string --match_string="#app_service_config_files:" --replace_string="app_service_config_files:" --target_file="/etc/matrix-synapse/homeserver.yaml" ynh_replace_string --match_string="#app_service_config_files:" --replace_string="app_service_config_files:" --target_file="/etc/matrix-synapse/homeserver.yaml"
ynh_replace_string --match_string="# - app_service_1.yaml" --replace_string=" - '/etc/matrix-synapse/$app-registration.yaml'" --target_file="/etc/matrix-synapse/homeserver.yaml" ynh_replace_string --match_string="# - app_service_1.yaml" --replace_string=" - '/etc/matrix-synapse/$app-registration.yaml'" --target_file="/etc/matrix-synapse/homeserver.yaml"
#You will then need to restart the synapse server. Remember to restart it every time the registration file is regenerated. #You will then need to restart the synapse server. Remember to restart it every time the registration file is regenerated.
service matrix-synapse restart
#Run the bridge with
#service mautrix-whatsapp restart
#./mautrix-whatsapp.
#================================================= #=================================================
@ -377,6 +373,11 @@ chown $mautrix_whatsapp_user:root -R $final_path
chown /etc/matrix-synapse/$app-registration.yaml --reference="/etc/matrix-synapse/homeserver.yaml" chown /etc/matrix-synapse/$app-registration.yaml --reference="/etc/matrix-synapse/homeserver.yaml"
chmod u=rwX,g=rX,o= /etc/matrix-synapse/$app-registration.yaml chmod u=rwX,g=rX,o= /etc/matrix-synapse/$app-registration.yaml
#You will then need to restart the synapse server. Remember to restart it every time the registration file is regenerated.
service matrix-synapse restart
#Run the bridge with
#service mautrix-whatsapp restart
#./mautrix-whatsapp.
#================================================= #=================================================
# SETUP LOGROTATE # SETUP LOGROTATE