mirror of
https://github.com/YunoHost-Apps/synapse_ynh.git
synced 2024-09-03 20:26:38 +02:00
Fix app service config file
This commit is contained in:
parent
145fafe1cc
commit
db4cecf095
2 changed files with 10 additions and 1 deletions
|
@ -380,7 +380,14 @@ ynh_add_config --template="../sources/update_synapse_for_appservice.sh" --destin
|
||||||
|
|
||||||
# Ensure app-service folder has exists and the config file exit (Migration)
|
# Ensure app-service folder has exists and the config file exit (Migration)
|
||||||
mkdir -p /etc/matrix-$app/app-service
|
mkdir -p /etc/matrix-$app/app-service
|
||||||
test -e /etc/matrix-$app/conf.d/app_service.yaml || touch /etc/matrix-$app/conf.d/app_service.yaml
|
if [ -e /etc/matrix-$app/conf.d/app_service.yaml ]; then
|
||||||
|
# ensure that the file is empty if no app service are installed (fix issue #385)
|
||||||
|
if [ ! "$(ls -A /etc/matrix-$app/app-service)" ]; then
|
||||||
|
echo "" > /etc/matrix-$app/conf.d/app_service.yaml
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
touch /etc/matrix-$app/conf.d/app_service.yaml
|
||||||
|
fi
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# ADVERTISE SERVICE IN ADMIN PANEL
|
# ADVERTISE SERVICE IN ADMIN PANEL
|
||||||
|
|
|
@ -8,6 +8,8 @@ cp $service_config_file /tmp/app_service_backup.yaml
|
||||||
|
|
||||||
if [ -n "$(ls /etc/matrix-$app/app-service/)" ]; then
|
if [ -n "$(ls /etc/matrix-$app/app-service/)" ]; then
|
||||||
echo "app_service_config_files:" > $service_config_file
|
echo "app_service_config_files:" > $service_config_file
|
||||||
|
else
|
||||||
|
echo "" > $service_config_file
|
||||||
fi
|
fi
|
||||||
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
|
||||||
|
|
Loading…
Add table
Reference in a new issue