diff --git a/bashbot.sh b/bashbot.sh index 74a1ea3..0db1887 100755 --- a/bashbot.sh +++ b/bashbot.sh @@ -10,7 +10,7 @@ # This file is public domain in the USA and all free countries. # Elsewhere, consider it to be WTFPLv2. (wtfpl.net/txt/copying) # -#### $$VERSION$$ v0.49-2-g0a90edb +#### $$VERSION$$ v0.49-3-g6f1c328 # get location of bashbot.sh an change to bashbot dir SCRIPT="./$(basename $0)" @@ -573,10 +573,10 @@ case "$1" in JOB="${JOB%:*}" fifo="back-${JOB}-${ME}_${CHAT[ID]}" # compose fifo from jobname, $ME (botname) and CHAT[ID] echo "restartbackground ${PROG} ${fifo}" - ( tmux kill-session -t "${fifo}"; tmux kill-session -t sendprocess_${fifo}; rm -f -r "$TMPDIR/${fifo})" 2>/dev/null + ( tmux kill-session -t "${fifo}"; tmux kill-session -t "sendprocess_${fifo}"; rm -f -r "$TMPDIR/${fifo})" 2>/dev/null mkfifo "$TMPDIR/${fifo}" - TMUX= tmux new-session -d -s "${fifo}" "${PROG} &>$TMPDIR/${fifo}; echo imprettydarnsuredatdisisdaendofdacmd>$TMPDIR/${fifo}" - TMUX= tmux new-session -d -s sendprocess_${fifo} "bash $SCRIPT outproc ${CHAT[ID]} ${fifo}" + TMUX= tmux new-session -d -s "${fifo}" "${PROGi}" &>"$TMPDIR/${fifo}"; echo "imprettydarnsuredatdisisdaendofdacmd" >"$TMPDIR/${fifo}" + TMUX= tmux new-session -d -s "sendprocess_${fifo}" "bash $SCRIPT outproc ${CHAT[ID]} ${fifo}" fi done ;; @@ -589,7 +589,7 @@ case "$1" in "killback" | "suspendback") $CLEAR echo -e "${GREEN}Stopping background processes ...${NC}" - for FILE in $"{TMPDIR}/*-back.cmd"; do + for FILE in "${TMPDIR}/*-back.cmd"; do if [ "$FILE" == "${TMPDIR}/*-back.cmd" ]; then echo -e "${RED}No background processes.${NC}"; break else diff --git a/notify b/notify index d312c78..5c25f19 100755 --- a/notify +++ b/notify @@ -2,11 +2,11 @@ # This file is public domain in the USA and all free countries. # Elsewhere, consider it to be WTFPLv2. (wtfpl.net/txt/copying) -#### $$VERSION$$ v0.49-2-g0a90edb +#### $$VERSION$$ v0.49-3-g6f1c328 # adjust your language setting here # https://github.com/topkecleon/telegram-bot-bash#setting-up-your-environment -export'LC_ALL=C.UTF-8' +export 'LC_ALL=C.UTF-8' export 'LANG=C.UTF-8' export 'LANGUAGE=C.UTF-8'