Add diagnostic script to check talkkonnect terminal fix status

Created check_talkkonnect_fix.sh to verify if the terminal initialization
fix has been applied to the talkkonnect systemd service. This script checks
for the presence of:
- Environment="TERM=dumb"
- StandardInput=null

These settings are required to prevent the "Cannot Initialize Terminal" error
when talkkonnect runs as a systemd service without a TTY.
This commit is contained in:
Claude
2025-11-23 03:42:05 +00:00
parent 80fd5d5d10
commit 0722e8786c
+56
View File
@@ -0,0 +1,56 @@
#!/bin/bash
################################################################################
# Check if talkkonnect terminal fix is applied
################################################################################
echo "================================"
echo " Talkkonnect Fix Status Check"
echo "================================"
echo
# Check if service file exists
if [ ! -f /etc/systemd/system/talkkonnect.service ]; then
echo "❌ Service file not found: /etc/systemd/system/talkkonnect.service"
exit 1
fi
echo "Service file found. Checking configuration..."
echo
# Check for TERM=dumb
if grep -q 'Environment="TERM=dumb"' /etc/systemd/system/talkkonnect.service; then
echo "✓ TERM=dumb is configured"
TERM_OK=1
else
echo "✗ TERM=dumb is MISSING"
TERM_OK=0
fi
# Check for StandardInput=null
if grep -q 'StandardInput=null' /etc/systemd/system/talkkonnect.service; then
echo "✓ StandardInput=null is configured"
STDIN_OK=1
else
echo "✗ StandardInput=null is MISSING"
STDIN_OK=0
fi
echo
echo "Current service file:"
echo "-------------------"
cat /etc/systemd/system/talkkonnect.service
echo "-------------------"
echo
if [ $TERM_OK -eq 1 ] && [ $STDIN_OK -eq 1 ]; then
echo "✓ Fix is properly applied!"
echo
echo "If you're still seeing errors, check:"
echo " sudo journalctl -u talkkonnect -n 100"
else
echo "❌ Fix is NOT applied. Run the fix script:"
echo " cd /home/user/ubk"
echo " sudo bash fix_talkkonnect_terminal.sh"
fi
echo