FAQ | This is a LIVE service | Changelog

Skip to content
Snippets Groups Projects
Commit 4465cf7a authored by Vitor Trovisco's avatar Vitor Trovisco
Browse files

Update weekly_export1.sh

Better logging messages
parent 26479a6a
No related branches found
No related tags found
No related merge requests found
......@@ -24,14 +24,14 @@ EXPORT_DIR="${CANTOSPACE}/import_export"
EXPORT_FILENAME=canto_server_export_latest.json
log "Exporting approved sessions into ${EXPORT_DIR}"
log "Starting"
if /etc/init.d/canto stop; then
sleep 10
log "Canto stopped"
log "Canto stop successful"
if ./canto/script/canto_docker ./script/canto_export.pl canto-json --export-curator-names --export-approved > "${EXPORT_DIR}/${EXPORT_FILENAME}"; then
log "Export successful"
log "Export of approved sessions into ${EXPORT_DIR} successful"
if [[ -e "${EXPORT_DIR}/${EXPORT_FILENAME}" ]]; then
......@@ -51,21 +51,26 @@ if /etc/init.d/canto stop; then
cp "${EXPORT_DIR}/${EXPORT_FILENAME}" "${ARCHIVE}/${EXPORT_FILENAME_ARCHIVE}"
else
log "${EXPORT_DIR}/${EXPORT_FILENAME} cannot be found - cannot continue"
log "${EXPORT_DIR}/${EXPORT_FILENAME} cannot be found - cannot continue"
log "Finished"
exit
fi
else
log "Export failed - aborting"
log "Export failed."
log "Finished"
exit
fi
/etc/init.d/canto start
log "Finished"
else
log "Canto could not stop. Cannot continue."
log "Finished"
fi
exit
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment