Skip to content

Commit

Permalink
Update installUpgradeFunctions.sh: add get_website_checksums()
Browse files Browse the repository at this point in the history
It will be used by install.sh and remote_website_install.sh
  • Loading branch information
EricClaeys committed Aug 30, 2024
1 parent b9e0291 commit 8fb3f34
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion scripts/installUpgradeFunctions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1028,7 +1028,26 @@ function get_computer()
# files directly. This does assume that both the cli and cgi settings files
# work in the same way.
#
get_php_setting() {
function get_php_setting() {
local SETTING="${1}"
php -r "echo ini_get('${SETTING}');"
}


####
# Get the checksum of all Website files, not including the ones the user creates or updates.
function get_website_checksums()
{
{
# Add important image files.
echo loading.jpg
echo allsky-logo.png
echo NoThumbnail.png
echo allsky-favicon.png

# Get all non-image files except for the ones the user creates/updates.
find . -type f '!' '(' -name '*.jpg' -or -name '*.png' -or -name '*.mp4' ')' |
sed 's;^./;;' |
grep -E -v "myFiles/|${ALLSKY_WEBSITE_CONFIGURATION_NAME}|${CHECKSUM_FILE}"
} | "${ALLSKY_UTILITIES}/getChecksum.php"
}

0 comments on commit 8fb3f34

Please sign in to comment.