fix: AppRun exits cleanly when no tray binary available

This commit is contained in:
Khoa Vo 2026-06-26 08:50:39 +07:00
parent 2ab132dd9a
commit 3ea380f6df

View file

@ -263,8 +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
echo "[vietc] Daemon running in foreground. Press Ctrl+C to stop." # No tray — daemon is already running in background, exit AppImage
wait "$DAEMON_PID" echo "[vietc] Daemon started (PID $DAEMON_PID). No tray icon (vietc-tray not built)."
echo "[vietc] The daemon will keep running in the background."
echo "[vietc] To stop it: pkill -x vietc"
fi fi
EOF EOF
chmod +x "$APPDIR/AppRun" chmod +x "$APPDIR/AppRun"