Skip to content

Commit

Permalink
Merge pull request #710 from linuxkidd/gui-install-fix
Browse files Browse the repository at this point in the history
Gui install fix - Only replace 1st instance of `XX_ALLSKY_HOME_XX`
  • Loading branch information
ckuethe authored Oct 21, 2021
2 parents aa4417b + 63f6f69 commit 9a29f14
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions gui/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@ modify_locations() { # Some files have placeholders for certain locations. Modi
echo -e "${GREEN}* Modifying locations in web files${NC}"
(
cd "${PORTAL_DIR}/includes"
sed -i "s;XX_ALLSKY_HOME_XX;${ALLSKY_HOME};" functions.php save_file.php
# NOTE: Only want to replace the FIRST instance of XX_ALLSKY_HOME_XX in funciton.php
# Otherwise, the edit check in functions.php will always fail.
sed -i "0,/XX_ALLSKY_HOME_XX/{s;XX_ALLSKY_HOME_XX;${ALLSKY_HOME};}" functions.php
sed -i "s;XX_ALLSKY_HOME_XX;${ALLSKY_HOME};" save_file.php
sed -i -e "s;XX_ALLSKY_SCRIPTS_XX;${ALLSKY_SCRIPTS};" \
-e "s;XX_ALLSKY_IMAGES_XX;${ALLSKY_IMAGES};" \
-e "s;XX_ALLSKY_CONFIG_XX;${ALLSKY_CONFIG};" \
Expand Down Expand Up @@ -155,4 +158,4 @@ if (whiptail --title "Allsky Software Installer" --yesno "The Allsky WebUI is no
reboot now
else
exit 3
fi
fi

0 comments on commit 9a29f14

Please sign in to comment.