use different delimiter with sed when setting xo-web path to config to get rid of hacky variable

This commit is contained in:
ronivay
2021-07-23 14:14:03 +03:00
parent c81836f936
commit 48f656aaf6

View File

@@ -613,9 +613,8 @@ function InstallXO {
printinfo "Fixing relative path to xo-web installation in xo-server configuration file"
INSTALLDIRESC=$(echo "$INSTALLDIR" | sed 's/\//\\\//g')
# shellcheck disable=SC1117
runcmd "sed -i \"s/#'\/any\/url' = '\/path\/to\/directory'/'\/' = '$INSTALLDIRESC\/xo-web\/dist\/'/\" $INSTALLDIR/xo-builds/xen-orchestra-$TIME/packages/xo-server/sample.config.toml"
runcmd "sed -i \"s%#'/any/url' = '/path/to/directory'%'/' = '$INSTALLDIR/xo-web/dist/'%\" $INSTALLDIR/xo-builds/xen-orchestra-$TIME/packages/xo-server/sample.config.toml"
sleep 2
if [[ "$PORT" != "80" ]]; then