From 35d945b9b6222c690a30e70da96daae227d3099b Mon Sep 17 00:00:00 2001 From: makefu Date: Mon, 24 Mar 2014 18:17:43 +0100 Subject: do not pipe shit into ncurses, just use tmux --- filehooker/root-image/krebs/lib/filehooker | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'filehooker/root-image/krebs/lib') diff --git a/filehooker/root-image/krebs/lib/filehooker b/filehooker/root-image/krebs/lib/filehooker index c72d4d51..c51be701 100644 --- a/filehooker/root-image/krebs/lib/filehooker +++ b/filehooker/root-image/krebs/lib/filehooker @@ -9,7 +9,8 @@ ncdc_bin=${ncdc_bin:-/usr/bin/ncdc} ncdc_config(){ # maybe we want to use the running ncdc process and communicate via tmux send-keys ? txt="$(cat)" - (sleep 1;printf "%s" "$txt";printf "/quit\n") | sudo -u $ncdc_user "$ncdc_bin" 2>/dev/null || \ +# printf "%s" "$txt" + ! sudo -u $ncdc_user /usr/bin/tmux has-session -t dcpp && echo "ncdc session must be running" && exit 1 sudo -u $ncdc_user /usr/bin/tmux send-keys -t dcpp:ncdc "$txt" C-m } -- cgit v1.2.3