Initial commit 2.
This commit is contained in:
@@ -47,6 +47,8 @@ if [ "$FOLLOW" = true ]; then
|
||||
FOLLOW_FLAG="-f"
|
||||
fi
|
||||
|
||||
trap 'echo -e "${YELLOW}Log viewing interrupted by user.${NC}"; exit 0' SIGINT
|
||||
|
||||
echo -e "${GREEN}Connecting to ${TARGET_HOST} to view logs...${NC}"
|
||||
|
||||
# Connect to the remote server and display logs
|
||||
|
||||
+9
-1
@@ -151,4 +151,12 @@ rm -rf "${TEMP_DIR}" || handle_error "Failed to clean up local temporary files"
|
||||
echo -e "${GREEN}Deployment process completed!${NC}"
|
||||
# Automatically tail logs after deployment
|
||||
echo -e "${GREEN}Tailing logs...${NC}"
|
||||
sh "$(dirname "$0")/log.sh" -f
|
||||
sh "$(dirname "$0")/log.sh" -f
|
||||
LOG_EXIT_CODE=$?
|
||||
if [ $LOG_EXIT_CODE -eq 130 ]; then
|
||||
echo -e "${YELLOW}Log viewing interrupted by user.${NC}"
|
||||
else
|
||||
if [ $LOG_EXIT_CODE -ne 0 ]; then
|
||||
handle_error "Log viewing failed with exit code $LOG_EXIT_CODE"
|
||||
fi
|
||||
fi
|
||||
Reference in New Issue
Block a user