1
0
Fork 0
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:
Josué Tille 2023-05-25 12:38:09 +02:00
parent 56c2a7e45b
commit b1968a55cb
No known key found for this signature in database
GPG key ID: 716A6C99B04194EF
3 changed files with 5 additions and 3 deletions

View file

@ -184,7 +184,7 @@ mkdir -p $data_path
mkdir -p /var/log/matrix-$app mkdir -p /var/log/matrix-$app
mkdir -p /etc/matrix-$app/conf.d mkdir -p /etc/matrix-$app/conf.d
mkdir -p /etc/matrix-$app/app-service mkdir -p /etc/matrix-$app/app-service
echo "app_service_config_files:" > /etc/matrix-$app/conf.d/app_service.yaml touch /etc/matrix-$app/conf.d/app_service.yaml
# Install synapse in virtualenv # Install synapse in virtualenv
install_sources install_sources

View file

@ -380,7 +380,7 @@ 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 || echo "app_service_config_files:" > /etc/matrix-$app/conf.d/app_service.yaml test -e /etc/matrix-$app/conf.d/app_service.yaml || touch /etc/matrix-$app/conf.d/app_service.yaml
#================================================= #=================================================
# ADVERTISE SERVICE IN ADMIN PANEL # ADVERTISE SERVICE IN ADMIN PANEL

View file

@ -6,7 +6,9 @@ service_config_file=/etc/matrix-$app/conf.d/app_service.yaml
# Backup the previous config file # Backup the previous config file
cp $service_config_file /tmp/app_service_backup.yaml cp $service_config_file /tmp/app_service_backup.yaml
echo "app_service_config_files:" > $service_config_file if [ -n "$(ls /etc/matrix-$app/app-service/)" ]; then
echo "app_service_config_files:" > $service_config_file
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
done done