From 77142b63bb5fa508712117c51a600944e6a772ce Mon Sep 17 00:00:00 2001 From: ronivay Date: Wed, 1 Aug 2018 15:55:45 +0300 Subject: [PATCH] Fix older installations not being updated because of existing systemd service symlink --- xo-install.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/xo-install.sh b/xo-install.sh index ea62778..e63976f 100755 --- a/xo-install.sh +++ b/xo-install.sh @@ -312,8 +312,14 @@ function InstallXO { chown -R $XOUSER:$XOUSER /var/lib/xo-server fi + # fix to prevent older installations to not update because systemd service is not symlinked anymore + if [[ $(find /etc/systemd/system -type l -name "xo-server.service") ]]; then + rm -f /etc/systemd/system/xo-server.service + fi + echo echo "Replacing systemd service configuration file" + /bin/cp -f $INSTALLDIR/xo-builds/xen-orchestra-$TIME/packages/xo-server/xo-server.service /etc/systemd/system/xo-server.service sleep 2 echo "Reloading systemd configuration"