1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/synapse_ynh.git synced 2024-09-03 20:26:38 +02:00

Merge pull request #218 from Gredin67/patch-1

correct rights for bridge registration and correct app action
This commit is contained in:
Josue-T 2020-11-02 21:52:07 +01:00 committed by GitHub
commit 6773230733
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -9,10 +9,11 @@ cp $service_config_file /tmp/app_service_backup.yaml
echo "app_service_config_files:" > $service_config_file echo "app_service_config_files:" > $service_config_file
for f in $(ls /etc/matrix-$app/app-service/); do for f in $(ls /etc/matrix-$app/app-service/); do
echo " - /etc/matrix-$app/app-service/$f" >> $service_config_file echo " - /etc/matrix-$app/app-service/$f" >> $service_config_file
chmod 600 /etc/matrix-$app/app-service/$f
done done
# Set permissions # Set permissions
chown matrix-$app $service_config_file chown --reference=$service_config_file -R /etc/matrix-$app
chmod 600 $service_config_file chmod 600 $service_config_file
systemctl restart matrix-$app systemctl restart matrix-$app
@ -22,5 +23,5 @@ if [ $? -eq 0 ]; then
exit 0 exit 0
else else
echo "Failed to restart synapse with the new config file. Restore the old config file !!" echo "Failed to restart synapse with the new config file. Restore the old config file !!"
cp /tmp/app_service_backup.yaml $service_config_file mv /tmp/app_service_backup.yaml $service_config_file
fi fi