feat: shutdown existing xo-server/xo-proxy processes after new build has finished
This commit is contained in:
@@ -686,18 +686,6 @@ function InstallXO {
|
|||||||
|
|
||||||
PrepInstall
|
PrepInstall
|
||||||
|
|
||||||
# Now that we know we're going to be building a new xen-orchestra, make
|
|
||||||
# sure there's no already-running xo-server process.
|
|
||||||
if [[ $(runcmd_stdout "pgrep -f xo-server") ]]; then
|
|
||||||
echo
|
|
||||||
printprog "Shutting down xo-server"
|
|
||||||
runcmd "/bin/systemctl stop xo-server" || {
|
|
||||||
printfail "failed to stop service, exiting..."
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
printok "Shutting down xo-server"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Fetch 3rd party plugins source code
|
# Fetch 3rd party plugins source code
|
||||||
InstallAdditionalXOPlugins
|
InstallAdditionalXOPlugins
|
||||||
|
|
||||||
@@ -711,6 +699,18 @@ function InstallXO {
|
|||||||
# Install plugins (takes care of 3rd party plugins as well)
|
# Install plugins (takes care of 3rd party plugins as well)
|
||||||
InstallXOPlugins
|
InstallXOPlugins
|
||||||
|
|
||||||
|
# shutdown possibly running xo-server
|
||||||
|
if [[ $(runcmd_stdout "pgrep -f xo-server") ]]; then
|
||||||
|
echo
|
||||||
|
printprog "Shutting down running xo-server"
|
||||||
|
runcmd "/bin/systemctl stop xo-server" || {
|
||||||
|
printfail "failed to stop service, exiting..."
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
printok "Shutting down running xo-server"
|
||||||
|
sleep 3
|
||||||
|
fi
|
||||||
|
|
||||||
echo
|
echo
|
||||||
printinfo "Fixing binary path in systemd service configuration file"
|
printinfo "Fixing binary path in systemd service configuration file"
|
||||||
# shellcheck disable=SC1117
|
# shellcheck disable=SC1117
|
||||||
@@ -953,17 +953,6 @@ function InstallXOProxy {
|
|||||||
|
|
||||||
PrepInstall
|
PrepInstall
|
||||||
|
|
||||||
# check that xo-proxy is not running
|
|
||||||
if [[ $(runcmd_stdout "pgrep -f xo-proxy") ]]; then
|
|
||||||
echo
|
|
||||||
printprog "Shutting down xo-proxy"
|
|
||||||
runcmd "/bin/systemctl stop xo-proxy" || {
|
|
||||||
printfail "failed to stop service, exiting..."
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
printok "Shutting down xo-proxy"
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo
|
echo
|
||||||
printinfo "xo-proxy build takes quite a while. Grab a cup of coffee and lay back"
|
printinfo "xo-proxy build takes quite a while. Grab a cup of coffee and lay back"
|
||||||
echo
|
echo
|
||||||
@@ -971,6 +960,18 @@ function InstallXOProxy {
|
|||||||
runcmd "cd $INSTALLDIR/xo-builds/xen-orchestra-$TIME && yarn && yarn build"
|
runcmd "cd $INSTALLDIR/xo-builds/xen-orchestra-$TIME && yarn && yarn build"
|
||||||
printok "Running installation"
|
printok "Running installation"
|
||||||
|
|
||||||
|
# shutdown possibly running xo-server
|
||||||
|
if [[ $(runcmd_stdout "pgrep -f xo-proxy") ]]; then
|
||||||
|
echo
|
||||||
|
printprog "Shutting down running xo-proxy"
|
||||||
|
runcmd "/bin/systemctl stop xo-proxy" || {
|
||||||
|
printfail "failed to stop service, exiting..."
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
printok "Shutting down running xo-proxy"
|
||||||
|
sleep 3
|
||||||
|
fi
|
||||||
|
|
||||||
echo
|
echo
|
||||||
printinfo "Disabling license check in proxy to enable running it in XO from sources"
|
printinfo "Disabling license check in proxy to enable running it in XO from sources"
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user