diff --git a/etc/library.sh b/etc/library.sh index dd4683f4e..08e2d04bc 100644 --- a/etc/library.sh +++ b/etc/library.sh @@ -116,7 +116,7 @@ function run_app_unsafe() echo "Running $ncp_app" echo "[ $ncp_app ]" >> $log - # Check if app is already running in termux + # Check if app is already running in tmux tmux has-session -t="$ncp_app" && { echo "Already running." >> $log echo "Abort." >> $log @@ -143,8 +143,8 @@ function run_app_unsafe() then echo "Running $ncp_app in tmux." | tee $log - tmux_log_file="$CFGDIR/../ncp-tmux/tmux.${ncp_app}.log" - export LIBDIR="$CFGDIR/../library.sh" + tmux_log_file="$(dirname $CFGDIR)/ncp-tmux/tmux.${ncp_app}.log" + export LIBDIR="$(dirname $CFGDIR)/library.sh" echo "" > "$tmux_log_file" #tail -f "$tmux_log_file" & diff --git a/ncp.sh b/ncp.sh index 71872fa35..ba911c4c0 100644 --- a/ncp.sh +++ b/ncp.sh @@ -22,8 +22,8 @@ install() { # NCP-CONFIG apt-get update - $APTINSTALL git dialog whiptail jq - mkdir -p "$CONFDIR" "$BINDIR" + $APTINSTALL git dialog whiptail jq tmux locales-all + mkdir -p "$CONFDIR" "$BINDIR" "$(dirname $CONFDIR)/ncp-tmux" # include option in raspi-config (only Raspbian) test -f /usr/bin/raspi-config && { diff --git a/update.sh b/update.sh index 761c4c3ac..23985f5bc 100755 --- a/update.sh +++ b/update.sh @@ -46,7 +46,8 @@ pgrep apt &>/dev/null && { echo "apt is currently running. Try again later"; ex # install new dependencies type jq &>/dev/null || { apt-get update - apt-get install -y --no-install-recommends jq + apt-get install -y --no-install-recommends jq tmux locales-all + mkdir -p "$(dirname $CONFDIR)/ncp-tmux" } # migrate to the new cfg format