Fix older installations not being updated because of existing systemd service symlink
This commit is contained in:
@@ -312,8 +312,14 @@ function InstallXO {
|
|||||||
chown -R $XOUSER:$XOUSER /var/lib/xo-server
|
chown -R $XOUSER:$XOUSER /var/lib/xo-server
|
||||||
fi
|
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
|
||||||
echo "Replacing systemd service configuration file"
|
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
|
/bin/cp -f $INSTALLDIR/xo-builds/xen-orchestra-$TIME/packages/xo-server/xo-server.service /etc/systemd/system/xo-server.service
|
||||||
sleep 2
|
sleep 2
|
||||||
echo "Reloading systemd configuration"
|
echo "Reloading systemd configuration"
|
||||||
|
Reference in New Issue
Block a user