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

Fix migration of systemd unit

This commit is contained in:
Josué Tille 2024-02-16 23:31:46 +01:00
parent c039c3774a
commit bdc9c35382
No known key found for this signature in database
GPG key ID: 5F259226AD51F2F5

View file

@ -209,20 +209,21 @@ fi
# MIGRATION 7 : STANDARDIZE SYSTEMD UNIT
#=================================================
if [ ! -e /etc/systemd/system/matrix-$app.service ]
if [ -e /etc/systemd/system/matrix-$app.service ]
then
ynh_script_progression --message="Migrating systemd unit to standard name..."
systemctl stop matrix-$app.service
systemctl stop synapse-coturn.service
systemctl stop matrix-$app.service || true
systemctl stop synapse-coturn.service || true
yunohost service remove matrix-$app
yunohost service remove coturn-$app
yunohost service remove matrix-$app || true
yunohost service remove coturn-$app || true
ynh_secure_remove --file=/etc/systemd/system/matrix-$app.service
ynh_secure_remove --file=/etc/systemd/system/coturn-$app.service
touch /etc/systemd/system/$app.service
systemctl daemon-reload || true
fi
#=================================================