fix: aetheel logs now works in foreground mode, tee output to log file on start

This commit is contained in:
2026-02-18 23:14:49 -05:00
parent 07008e826e
commit b8b3f44d52

View File

@@ -1044,7 +1044,8 @@ cd "$AETHEEL_DIR"
case "${1:-start}" in
start)
shift 2>/dev/null || true
exec $RUN_CMD "$AETHEEL_DIR/main.py" "$@"
mkdir -p "$HOME/.aetheel/logs"
exec $RUN_CMD "$AETHEEL_DIR/main.py" "$@" 2>&1 | tee -a "$HOME/.aetheel/logs/aetheel.log"
;;
setup)
exec "$AETHEEL_DIR/install.sh" --setup
@@ -1103,7 +1104,16 @@ case "${1:-start}" in
esac
;;
logs)
tail -f "$HOME/.aetheel/logs/aetheel.log" 2>/dev/null || echo "No log file found"
LOG_FILE="$HOME/.aetheel/logs/aetheel.log"
ERR_FILE="$HOME/.aetheel/logs/aetheel.error.log"
if [ -f "$LOG_FILE" ]; then
tail -f "$LOG_FILE"
elif [ -f "$ERR_FILE" ]; then
tail -f "$ERR_FILE"
else
echo "No log files found at ~/.aetheel/logs/"
echo "Logs are created when you run 'aetheel start' or the background service is running."
fi
;;
update)
cd "$AETHEEL_DIR"