fix: AppImage now requires vietc-tray to start, exits with error if missing

This commit is contained in:
Khoa Vo 2026-06-26 08:57:56 +07:00
parent 3ea380f6df
commit ebf2753906

View file

@ -263,10 +263,10 @@ trap cleanup_daemon EXIT INT TERM
if [ -f "$HERE/usr/bin/vietc-tray" ]; then if [ -f "$HERE/usr/bin/vietc-tray" ]; then
"$HERE/usr/bin/vietc-tray" "$@" "$HERE/usr/bin/vietc-tray" "$@"
else else
# No tray — daemon is already running in background, exit AppImage echo "[vietc] ERROR: vietc-tray not found. The AppImage cannot start without it."
echo "[vietc] Daemon started (PID $DAEMON_PID). No tray icon (vietc-tray not built)." echo "[vietc] Stopping."
echo "[vietc] The daemon will keep running in the background." kill "$DAEMON_PID" 2>/dev/null
echo "[vietc] To stop it: pkill -x vietc" exit 1
fi fi
EOF EOF
chmod +x "$APPDIR/AppRun" chmod +x "$APPDIR/AppRun"