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
56c2a7e45b
commit
b1968a55cb
3 changed files with 5 additions and 3 deletions
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue