Skip to content

Commit 3c06803

Browse files
authored
Update install.sh: Deal with Website "meteors" directory
1 parent 3d4d476 commit 3c06803

File tree

1 file changed

+24
-1
lines changed

1 file changed

+24
-1
lines changed

install.sh

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1013,7 +1013,8 @@ set_permissions()
10131013
"${ALLSKY_WEBSITE_MYFILES_DIR}" \
10141014
"${ALLSKY_WEBSITE}/videos/thumbnails" \
10151015
"${ALLSKY_WEBSITE}/keograms/thumbnails" \
1016-
"${ALLSKY_WEBSITE}/startrails/thumbnails"
1016+
"${ALLSKY_WEBSITE}/startrails/thumbnails" \
1017+
"${ALLSKY_WEBSITE}/meteors/thumbnails"
10171018

10181019
# Not everything in the Website needs to be writable by the web server,
10191020
# but make them all that way so we don't worry about missing something.
@@ -2696,6 +2697,17 @@ restore_prior_website_files()
26962697
display_msg --log progress "${ITEM}: ${NOT_RESTORED}"
26972698
fi
26982699

2700+
ITEM="${SPACE}${SPACE}meteors"
2701+
D="${PRIOR_WEBSITE_DIR}/meteors/thumbnails"
2702+
[[ -d ${D} ]] && mv "${D}" "${ALLSKY_WEBSITE}/meteors"
2703+
count=$( get_count "${PRIOR_WEBSITE_DIR}/meteors" 'meteors-*' )
2704+
if [[ ${count} -ge 1 ]]; then
2705+
display_msg --log progress "${ITEM} (moving)"
2706+
mv "${PRIOR_WEBSITE_DIR}"/meteors/meteors-* "${ALLSKY_WEBSITE}/meteors"
2707+
else
2708+
display_msg --log progress "${ITEM}: ${NOT_RESTORED}"
2709+
fi
2710+
26992711
ITEM="${SPACE}${SPACE}'${ALLSKY_MYFILES_NAME}' directory"
27002712
D="${PRIOR_WEBSITE_DIR}/${ALLSKY_MYFILES_NAME}"
27012713
if [[ -d ${D} ]]; then
@@ -2899,6 +2911,17 @@ do_restore()
28992911
display_msg --log progress "${ITEM}: ${NOT_RESTORED}"
29002912
fi
29012913

2914+
ITEM="${SPACE}${SPACE}meteors"
2915+
D="${ALLSKY_WEBSITE}/meteors/thumbnails"
2916+
[[ -d ${D} ]] && mv "${D}" "${PRIOR_WEBSITE_DIR}/meteors"
2917+
count=$( get_count "${ALLSKY_WEBSITE}/meteors" 'meteors-*' )
2918+
if [[ ${count} -ge 1 ]]; then
2919+
display_msg --log progress "${ITEM} (moving back)"
2920+
mv "${ALLSKY_WEBSITE}"/meteors/meteors-* "${PRIOR_WEBSITE_DIR}/meteors"
2921+
else
2922+
display_msg --log progress "${ITEM}: ${NOT_RESTORED}"
2923+
fi
2924+
29022925
ITEM="${SPACE}${SPACE}${ALLSKY_MYFILES_NAME}"
29032926
if [[ -d ${ALLSKY_WEBSITE_MYFILES_DIR} ]]; then
29042927
display_msg --log progress "${ITEM} (moving)"

0 commit comments

Comments
 (0)