FAQ | This is a LIVE service | Changelog

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

Add new file - canto_running_log.sh

This script prints all the activity log from the running canto-server container into the file 'canto_running.log' in the 'logs' sub-folder of 'canto-space'
parent 63b71b8d
No related branches found
No related tags found
1 merge request!6Testing
#!/bin/bash
#this script prints all the activity log messages from the running canto-server container into the file 'canto_running.log' in the 'logs' sub-folder of 'canto-space'
# Define canto-space root
CANTOSPACE="/data/export/canto-space"
# Define logs folder inside canto-space
LOGS="logs"
# Define log file
LOGFILE="${CANTOSPACE}/${LOGS}/canto_server_running.log"
#this line retrieves the canto container id
DOCKERNAME=$(docker ps -a --filter status=running | awk '$2 ~ /pombase\/canto-run/ { print $1 }')
if [[ ! -z "${DOCKERNAME}" ]]; then
echo "Canto running on container ${DOCKERNAME} - see canto_server_running.log for the log messages"
# Redirect all output to logfile
exec &> "${LOGFILE}"
#docker logs is docker's command to retrieve all log messages from a specific container
docker logs "${DOCKERNAME}"
else echo "Canto not running - no log messages to show"
fi
exit
\ No newline at end of file
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