Browse Source

rename to addtimestamp

pull/3795/head
Daniel Gibbs 3 years ago
parent
commit
884f4368ad
  1. 8
      lgsm/functions/command_start.sh

8
lgsm/functions/command_start.sh

@ -8,7 +8,7 @@
commandname="START" commandname="START"
commandaction="Starting" commandaction="Starting"
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
add_ts="gawk '{ print strftime(\\\"[$logtimestampformat]\\\"), \\\$0 }'" addtimestamp="gawk '{ print strftime(\\\"[$logtimestampformat]\\\"), \\\$0 }'"
fn_firstcommand_set fn_firstcommand_set
fn_start_teamspeak3() { fn_start_teamspeak3() {
@ -94,7 +94,7 @@ fn_start_tmux() {
echo -e "tmux version: master (user compiled)" >> "${consolelog}" echo -e "tmux version: master (user compiled)" >> "${consolelog}"
if [ "${consolelogging}" == "on" ] || [ -z "${consolelogging}" ]; then if [ "${consolelogging}" == "on" ] || [ -z "${consolelogging}" ]; then
if [ "$logtimestamp" == "on" ]; then if [ "$logtimestamp" == "on" ]; then
tmux pipe-pane -o -t "${sessionname}" "exec bash -c \"cat | $add_ts\" >> '${consolelog}'" tmux pipe-pane -o -t "${sessionname}" "exec bash -c \"cat | $addtimestamp\" >> '${consolelog}'"
else else
tmux pipe-pane -o -t "${sessionname}" "exec cat >> '${consolelog}'" tmux pipe-pane -o -t "${sessionname}" "exec cat >> '${consolelog}'"
fi fi
@ -115,7 +115,7 @@ fn_start_tmux() {
# Console logging enable or not set. # Console logging enable or not set.
elif [ "${consolelogging}" == "on" ] || [ -z "${consolelogging}" ]; then elif [ "${consolelogging}" == "on" ] || [ -z "${consolelogging}" ]; then
if [ "$logtimestamp" == "on" ]; then if [ "$logtimestamp" == "on" ]; then
tmux pipe-pane -o -t "${sessionname}" "exec bash -c \"cat | $add_ts\" >> '${consolelog}'" tmux pipe-pane -o -t "${sessionname}" "exec bash -c \"cat | $addtimestamp\" >> '${consolelog}'"
else else
tmux pipe-pane -o -t "${sessionname}" "exec cat >> '${consolelog}'" tmux pipe-pane -o -t "${sessionname}" "exec cat >> '${consolelog}'"
fi fi
@ -147,7 +147,7 @@ fn_start_tmux() {
echo -e "" echo -e ""
echo -e "Error" echo -e "Error"
echo -e "=================================" echo -e "================================="
cat "${lgsmlogdir}/.${selfname}-tmux-error.tmp" | tee -a "${lgsmlog}" tee -a "${lgsmlog}" < "${lgsmlogdir}/.${selfname}-tmux-error.tmp"
# Detected error https://linuxgsm.com/support # Detected error https://linuxgsm.com/support
if grep -c "Operation not permitted" "${lgsmlogdir}/.${selfname}-tmux-error.tmp"; then if grep -c "Operation not permitted" "${lgsmlogdir}/.${selfname}-tmux-error.tmp"; then

Loading…
Cancel
Save