Skip to content

Commit

Permalink
Merge pull request #578 from thomasjacquin/2-letter-upload
Browse files Browse the repository at this point in the history
2 letter upload
  • Loading branch information
linuxkidd authored Oct 6, 2021
2 parents 5119e8d + 5328487 commit a968a61
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 22 deletions.
3 changes: 1 addition & 2 deletions scripts/copy_notification_image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,7 @@ if [ "${UPLOAD_IMG}" = "true" ] ; then
# We're actually uploading $IMAGE_TO_USE, but show $NOTIFICATIONFILE
# in the message since it's more descriptive.
echo -e "${ME}: Uploading $(basename "${NOTIFICATIONFILE}")\n"
# NI == Notification Image
"${ALLSKY_SCRIPTS}/upload.sh" --silent "${IMAGE_TO_USE}" "${IMGDIR}" "${FULL_FILENAME}" "NI"
"${ALLSKY_SCRIPTS}/upload.sh" --silent "${IMAGE_TO_USE}" "${IMGDIR}" "${FULL_FILENAME}" "NotificationImage"
exit $?
fi
exit 0
9 changes: 3 additions & 6 deletions scripts/endOfNight.sh
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,7 @@ if [[ ${KEOGRAM} == "true" ]]; then
if [ "${KEOGRAM_DESTINATION_NAME}" != "" ]; then
KEOGRAM_FILE="${KEOGRAM_DESTINATION_NAME}"
fi
# KG == KeoGram
"${ALLSKY_SCRIPTS}/upload.sh" "${UPLOAD_FILE}" "${KEOGRAM_DIR}" "${KEOGRAM_FILE}" "KG"
"${ALLSKY_SCRIPTS}/upload.sh" "${UPLOAD_FILE}" "${KEOGRAM_DIR}" "${KEOGRAM_FILE}" "Keogram"

# Optionally copy to the local website in addition to the upload above.
if [ "${WEB_KEOGRAM_DIR}" != "" ]; then
Expand All @@ -95,8 +94,7 @@ if [[ ${STARTRAILS} == "true" ]]; then
if [ "${STARTRAILS_DESTINATION_NAME}" != "" ]; then
STARTRAILS_FILE="${STARTRAILS_DESTINATION_NAME}"
fi
# ST == Star Trails
"${ALLSKY_SCRIPTS}/upload.sh" "${UPLOAD_FILE}" "${STARTRAILS_DIR}" "${STARTRAILS_FILE}" "ST"
"${ALLSKY_SCRIPTS}/upload.sh" "${UPLOAD_FILE}" "${STARTRAILS_DIR}" "${STARTRAILS_FILE}" "Startrails"

# Optionally copy to the local website in addition to the upload above.
if [ "${WEB_STARTRAILS_DIR}" != "" ]; then
Expand All @@ -121,8 +119,7 @@ if [[ ${TIMELAPSE} == "true" ]]; then
if [ "${VIDEOS_DESTINATION_NAME}" != "" ]; then
VIDEOS_FILE="${VIDEOS_DESTINATION_NAME}"
fi
# TL == Time Lapse
"${ALLSKY_SCRIPTS}/upload.sh" "${UPLOAD_FILE}" "${VIDEOS_DIR}" "${VIDEOS_FILE}" "TL"
"${ALLSKY_SCRIPTS}/upload.sh" "${UPLOAD_FILE}" "${VIDEOS_DIR}" "${VIDEOS_FILE}" "Timelapse"

# Optionally copy to the local website in addition to the upload above.
if [ "${WEB_VIDEOS_DIR}" != "" ]; then
Expand Down
10 changes: 4 additions & 6 deletions scripts/generateForDay.sh
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ if [ "${DO_KEOGRAM}" = "true" ] ; then
KEOGRAM_FILE="${KEOGRAM_DESTINATION_NAME}"
fi
echo "Uploading ${KEOGRAM_FILE}"
# KG == KeoGram. "--silent" is for silent mode
"${ALLSKY_SCRIPTS}/upload.sh" --silent "${UPLOAD_FILE}" "${KEOGRAM_DIR}" "${KEOGRAM_FILE}" "KG"
# "--silent" is for silent mode
"${ALLSKY_SCRIPTS}/upload.sh" --silent "${UPLOAD_FILE}" "${KEOGRAM_DIR}" "${KEOGRAM_FILE}" "Keogram"
[ $? -eq 0 ] && echo "${KEOGRAM_FILE} uploaded"
else
echo -en "${YELLOW}"
Expand All @@ -114,8 +114,7 @@ if [ "${DO_STARTRAILS}" = "true" ] ; then
STARTRAILS_FILE="${STARTRAILS_DESTINATION_NAME}"
fi
echo "Uploading ${STARTRAILS_FILE}"
# ST = Star Trails
"${ALLSKY_SCRIPTS}/upload.sh" --silent "${UPLOAD_FILE}" "${STARTRAILS_DIR}" "${STARTRAILS_FILE}" "ST"
"${ALLSKY_SCRIPTS}/upload.sh" --silent "${UPLOAD_FILE}" "${STARTRAILS_DIR}" "${STARTRAILS_FILE}" "Startrails"
[ $? -eq 0 ] && echo "${STARTRAILS_FILE} uploaded"
else
echo -en "${YELLOW}"
Expand All @@ -139,8 +138,7 @@ if [ "${DO_TIMELAPSE}" = "true" ] ; then
VIDEOS_FILE="${VIDEOS_DESTINATION_NAME}"
fi
echo "Uploading ${VIDEOS_FILE}"
# TL = Time Lapse
"${ALLSKY_SCRIPTS}/upload.sh" --silent "${UPLOAD_FILE}" "${VIDEOS_DIR}" "${VIDEOS_FILE}" "TL"
"${ALLSKY_SCRIPTS}/upload.sh" --silent "${UPLOAD_FILE}" "${VIDEOS_DIR}" "${VIDEOS_FILE}" "Timelapse"
[ $? -eq 0 ] && echo "${VIDEOS_FILE} uploaded"
else
echo -en "${YELLOW}"
Expand Down
3 changes: 1 addition & 2 deletions scripts/postData.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,4 @@ OUTPUT_FILE="${ALLSKY_TMP}/${FILE}"
echo }
) > "${OUTPUT_FILE}"

# PD == Post Data
"${ALLSKY_SCRIPTS}/upload.sh" --silent "${OUTPUT_FILE}" "${IMGDIR}" "${FILE}" "PD"
"${ALLSKY_SCRIPTS}/upload.sh" --silent "${OUTPUT_FILE}" "${IMGDIR}" "${FILE}" "PostData"
3 changes: 1 addition & 2 deletions scripts/saveImageDay.sh
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,7 @@ if [ "$UPLOAD_IMG" = true ] ; then
fi
fi

# SI == Save Image
"${ALLSKY_SCRIPTS}/upload.sh" "${IMAGE_TO_USE}" "${IMGDIR}" "${IMAGE_TO_USE}" "SI"
"${ALLSKY_SCRIPTS}/upload.sh" "${IMAGE_TO_USE}" "${IMGDIR}" "${IMAGE_TO_USE}" "SaveImageDay"
exit $?
fi

Expand Down
2 changes: 1 addition & 1 deletion scripts/saveImageNight.sh
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ if [[ "$UPLOAD_IMG" == "true" ]] ; then
fi
fi

"${ALLSKY_SCRIPTS}/upload.sh" "${IMAGE_TO_USE}" "${IMGDIR}" "${IMAGE_TO_USE}" "SI"
"${ALLSKY_SCRIPTS}/upload.sh" "${IMAGE_TO_USE}" "${IMGDIR}" "${IMAGE_TO_USE}" "SaveImageNight"
exit $?
fi
exit 0
6 changes: 3 additions & 3 deletions scripts/upload.sh
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,10 @@ else # sftp/ftp
# Sometimes have problems with "max-reties 1", so make it 2
echo set net:max-retries 2
echo set net:timeout 20
echo rm -f ${TEMP_NAME} # just in case it's already there
echo put "\"${FILE_TO_UPLOAD}\"" -o ${TEMP_NAME}
echo rm -f "${TEMP_NAME}" # just in case it's already there
echo put "\"${FILE_TO_UPLOAD}\"" -o "${TEMP_NAME}"
echo rm -f "\"${DESTINATION_FILE}\""
echo mv ${TEMP_NAME} "\"${REMOTE_DIR}${SLASH}${DESTINATION_FILE}\""
echo mv "${TEMP_NAME}" "\"${REMOTE_DIR}${SLASH}${DESTINATION_FILE}\""
echo bye
) > "${LFTP_CMDS}"
lftp -f "${LFTP_CMDS}" > "${LOG}" 2>&1
Expand Down

0 comments on commit a968a61

Please sign in to comment.