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:
commit
6773230733
1 changed files with 3 additions and 2 deletions
|
@ -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
|
||||||
|
|
Loading…
Add table
Reference in a new issue