Skip to content

Commit b176ad8

Browse files
author
theCalcaholic
committed
Install tmux and dependencies on installation/update
1 parent 9ff0704 commit b176ad8

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

etc/library.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ function run_app_unsafe()
116116
echo "Running $ncp_app"
117117
echo "[ $ncp_app ]" >> $log
118118

119-
# Check if app is already running in termux
119+
# Check if app is already running in tmux
120120
tmux has-session -t="$ncp_app" && {
121121
echo "Already running." >> $log
122122
echo "Abort." >> $log
@@ -143,8 +143,8 @@ function run_app_unsafe()
143143
then
144144
echo "Running $ncp_app in tmux." | tee $log
145145

146-
tmux_log_file="$CFGDIR/../ncp-tmux/tmux.${ncp_app}.log"
147-
export LIBDIR="$CFGDIR/../library.sh"
146+
tmux_log_file="$(dirname $CFGDIR)/ncp-tmux/tmux.${ncp_app}.log"
147+
export LIBDIR="$(dirname $CFGDIR)/library.sh"
148148

149149
echo "" > "$tmux_log_file"
150150
#tail -f "$tmux_log_file" &

ncp.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ install()
2222
{
2323
# NCP-CONFIG
2424
apt-get update
25-
$APTINSTALL git dialog whiptail jq
26-
mkdir -p "$CONFDIR" "$BINDIR"
25+
$APTINSTALL git dialog whiptail jq tmux locales-all
26+
mkdir -p "$CONFDIR" "$BINDIR" "$(dirname $CONFDIR)/ncp-tmux"
2727

2828
# include option in raspi-config (only Raspbian)
2929
test -f /usr/bin/raspi-config && {

update.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ pgrep apt &>/dev/null && { echo "apt is currently running. Try again later"; ex
4646
# install new dependencies
4747
type jq &>/dev/null || {
4848
apt-get update
49-
apt-get install -y --no-install-recommends jq
49+
apt-get install -y --no-install-recommends jq tmux locales-all
50+
mkdir -p "$(dirname $CONFDIR)/ncp-tmux"
5051
}
5152

5253
# migrate to the new cfg format

0 commit comments

Comments
 (0)