Initial commit 2.

This commit is contained in:
2025-05-07 10:03:24 +08:00
parent 0ae78d3759
commit 90fe018438
14 changed files with 64 additions and 160 deletions
+2
View File
@@ -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
View File
@@ -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