Browse Source

Encapsulate service name in quotations

pull/450/head
Scarsz 10 years ago
parent
commit
de5de8ff38
  1. 10
      functions/fn_start

10
functions/fn_start

@ -114,7 +114,7 @@ fi
# Create lock file
date > "${rootdir}/${lockselfname}"
cd "${executabledir}"
tmux new-session -d -s ${servicename} "${executable} ${parms}" 2> "${scriptlogdir}/.${servicename}-tmux-error.tmp"
tmux new-session -d -s "${servicename}" "${executable} ${parms}" 2> "${scriptlogdir}/.${servicename}-tmux-error.tmp"
# tmux pipe-pane not supported in tmux versions < 1.6
if [ "$(tmux -V|sed "s/tmux //"|sed -n '1 p'|tr -cd [:digit:])" -lt "16" ]; then
echo "Console logging disabled: Tmux => 1.6 required" >> "${consolelog}"
@ -124,7 +124,7 @@ elif [ "$(tmux -V|sed "s/tmux //"|sed -n '1 p'|tr -cd [:digit:])" -eq "18" ]; th
echo "Currently installed: $(tmux -V)" >> "${consolelog}"
else
touch "${consolelog}"
tmux pipe-pane -o -t ${servicename} "exec cat >> '${consolelog}'"
tmux pipe-pane -o -t "${servicename}" "exec cat >> '${consolelog}'"
fi
sleep 1
tmuxwc=$(tmux list-sessions 2>&1|awk '{print $1}'|grep -Ec "^${servicename}:")
@ -141,8 +141,8 @@ if [ "${tmuxwc}" -eq 0 ]; then
echo ""
echo "Command"
echo "================================="
echo "tmux new-session -d -s ${servicename} "${executable} ${parms}""
echo "tmux new-session -d -s ${servicename} "${executable} ${parms}"" >> "${scriptlog}"
echo "tmux new-session -d -s "${servicename}" "${executable} ${parms}""
echo "tmux new-session -d -s "${servicename}" "${executable} ${parms}"" >> "${scriptlog}"
echo ""
echo "Error"
echo "================================="
@ -188,4 +188,4 @@ if [ "${gamename}" == "Teamspeak 3" ]; then
fn_start_teamspeak3
else
fn_start_tmux
fi
fi

Loading…
Cancel
Save