Skip to content

Commit

Permalink
Install tmux and dependencies on installation/update
Browse files Browse the repository at this point in the history
  • Loading branch information
theCalcaholic committed Feb 8, 2019
1 parent 9ff0704 commit b176ad8
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
6 changes: 3 additions & 3 deletions etc/library.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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" &
Expand Down
4 changes: 2 additions & 2 deletions ncp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 && {
Expand Down
3 changes: 2 additions & 1 deletion update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b176ad8

Please sign in to comment.