mirror of
https://github.com/itiligent/Easy-Guacamole-Installer.git
synced 2025-12-14 02:12:31 +00:00
fix root url redirect upgrade bug
old method to shorten url breaks upgrades
in /var/lib/${TOMCAT_VERSION}/webapps
This commit is contained in:
parent
2dcbe83b47
commit
42baa0e220
1 changed files with 4 additions and 3 deletions
|
|
@ -599,10 +599,11 @@ expect eof
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "${CHANGE_ROOT}" = true ]; then
|
if [ "${CHANGE_ROOT}" = true ]; then
|
||||||
echo -e "${GREY}Setting default Guacamole url to http root...${DGREY}"
|
echo -e "${GREY}Shortening the Guacamole root url and setting up redirect...${DGREY}"
|
||||||
systemctl stop ${TOMCAT_VERSION}
|
systemctl stop ${TOMCAT_VERSION}
|
||||||
rm -rf /var/lib/${TOMCAT_VERSION}/webapps/ROOT
|
mv /var/lib/${TOMCAT_VERSION}/webapps/ROOT/index.html index.html.old
|
||||||
mv /var/lib/${TOMCAT_VERSION}/webapps/guacamole.war /var/lib/${TOMCAT_VERSION}/webapps/ROOT.war
|
touch /var/lib/${TOMCAT_VERSION}/webapps/ROOT/index.jsp
|
||||||
|
echo "<% response.sendRedirect(\"/guacamole\");%>" >>/var/lib/${TOMCAT_VERSION}/webapps/ROOT/index.jsp
|
||||||
systemctl start ${TOMCAT_VERSION}
|
systemctl start ${TOMCAT_VERSION}
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
echo -e "${LRED}Failed. See ${LOG_LOCATION}${GREY}" 1>&2
|
echo -e "${LRED}Failed. See ${LOG_LOCATION}${GREY}" 1>&2
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue