summaryrefslogtreecommitdiffstats
path: root/filehooker/root-image/krebs/lib
diff options
context:
space:
mode:
authormakefu <github@syntax-fehler.de>2014-03-24 18:17:43 +0100
committermakefu <github@syntax-fehler.de>2014-03-24 18:17:43 +0100
commit35d945b9b6222c690a30e70da96daae227d3099b (patch)
tree2cff5c0e58f2f022b506d60b4cf342c79da74f40 /filehooker/root-image/krebs/lib
parent8861888838d48eed40b3cc65abd933ebd617ec89 (diff)
do not pipe shit into ncurses, just use tmux
Diffstat (limited to 'filehooker/root-image/krebs/lib')
-rw-r--r--filehooker/root-image/krebs/lib/filehooker3
1 files changed, 2 insertions, 1 deletions
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
}