Repository navigation
Expand file tree
/
Copy pathCheck.command
More file actions
executable file
·58 lines (50 loc) · 1.78 KB
/
Copy pathCheck.command
File metadata and controls
executable file
·58 lines (50 loc) · 1.78 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#!/bin/bash
# Created by Cooper Santillan
# January 20, 2026
echo "------------------------------------------"
echo "🔍 OSC Music Bridge - Diagnostic Tool"
echo "------------------------------------------"
# 1. Check if the process is running using the new custom name
PID=$(pgrep -f "OSC_Music_Bridge")
if [ -z "$PID" ]; then
echo "❌ PROCESS: NOT RUNNING"
echo " (Checked for custom binary: OSC_Music_Bridge)"
else
echo "✅ PROCESS: Running (PID: $PID)"
fi
# 2. Check Network Ports
echo "🌐 Checking Network Ports..."
# We check for both OSC (8000) and UDP (7000)
OSC_LISTEN=$(lsof -i :8000 | grep LISTEN)
UDP_LISTEN=$(lsof -i :7000)
if [ ! -z "$OSC_LISTEN" ] || [ ! -z "$UDP_LISTEN" ]; then
[ ! -z "$OSC_LISTEN" ] && echo " - Port 8000 (OSC): LISTENING"
[ ! -z "$UDP_LISTEN" ] && echo " - Port 7000 (UDP): ACTIVE"
else
echo " ❌ No ports are currently active."
fi
# 3. Check LaunchAgent Status using the new Label
echo "🤖 Checking Background Service..."
SERVICE_LABEL="com.cooper.oscmusicbridge"
if launchctl list | grep -q "$SERVICE_LABEL"; then
echo " ✅ LaunchAgent '$SERVICE_LABEL' is LOADED"
else
echo " ❌ LaunchAgent is NOT loaded."
fi
# 4. Show Recent Logs (Updated to the new log filenames)
echo "------------------------------------------"
echo "📝 RECENT LOGS (Last 5 events):"
if [ -f "/tmp/osc_bridge.out" ]; then
tail -n 5 /tmp/osc_bridge.out
else
echo " No log file found at /tmp/osc_bridge.out"
fi
echo "------------------------------------------"
echo "⚠️ RECENT ERRORS (Last 5 errors):"
if [ -f "/tmp/osc_bridge.err" ]; then
tail -n 5 /tmp/osc_bridge.err
else
echo " No errors reported in /tmp/osc_bridge.err"
fi
echo "------------------------------------------"
read -p "Press Enter to close this window..."