mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-10-16 06:06:16 +00:00
Fixing variables in rtorrentInitTmux.bash script (See #10)
This commit is contained in:
@@ -65,13 +65,12 @@ options=""
|
|||||||
tmuxname="rtorrent"
|
tmuxname="rtorrent"
|
||||||
|
|
||||||
# name of window in tmux session
|
# name of window in tmux session
|
||||||
DESC="rT"
|
tmuxwindowname="rT"
|
||||||
#######################
|
#######################
|
||||||
###END CONFIGURATION###
|
###END CONFIGURATION###
|
||||||
#######################
|
#######################
|
||||||
PATH=/usr/bin:/usr/local/bin:/usr/local/sbin:/sbin:/bin:/usr/sbin
|
PATH=/usr/bin:/usr/local/bin:/usr/local/sbin:/sbin:/bin:/usr/sbin
|
||||||
NAME=rtorrent
|
NAME=rtorrent
|
||||||
DDIR="/opt/rtorrent/bin"
|
|
||||||
DAEMON=$NAME
|
DAEMON=$NAME
|
||||||
SCRIPTNAME=/etc/init.d/$NAME
|
SCRIPTNAME=/etc/init.d/$NAME
|
||||||
RTXMLRPCBIN="$base/bin/rtxmlrpc"
|
RTXMLRPCBIN="$base/bin/rtxmlrpc"
|
||||||
@@ -118,7 +117,7 @@ d_start() {
|
|||||||
fi
|
fi
|
||||||
# start rtorrent always in the 3rd tmux window (2) if it's not running and leave shell behind to be able to see reason of a crash
|
# start rtorrent always in the 3rd tmux window (2) if it's not running and leave shell behind to be able to see reason of a crash
|
||||||
if [ "$(status)" == "" ]; then
|
if [ "$(status)" == "" ]; then
|
||||||
su -c "tmux -2u list-panes -t ${tmuxname}:2 &>/dev/null && tmux -2u respawn-pane -t ${tmuxname}:2 -k \"${DDIR}/${DAEMON} ${options}; bash\" || tmux -2u new-window -t ${tmuxname}:2 -n ${DESC} \"${DDIR}/${DAEMON} ${options}; bash\"" $user
|
su -c "tmux -2u list-panes -t ${tmuxname}:2 &>/dev/null && tmux -2u respawn-pane -t ${tmuxname}:2 -k \"${DAEMON} ${options}; bash\" || tmux -2u new-window -t ${tmuxname}:2 -n ${tmuxwindowname} \"${DAEMON} ${options}; bash\"" $user
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -139,17 +138,17 @@ checkcnfg
|
|||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
start)
|
start)
|
||||||
echo -n "Starting $DESC: $NAME"
|
echo -n "Starting $tmuxwindowname: $NAME"
|
||||||
d_start
|
d_start
|
||||||
echo "."
|
echo "."
|
||||||
;;
|
;;
|
||||||
stop)
|
stop)
|
||||||
echo -n "Stopping $DESC: $NAME"
|
echo -n "Stopping $tmuxwindowname: $NAME"
|
||||||
d_stop
|
d_stop
|
||||||
echo "."
|
echo "."
|
||||||
;;
|
;;
|
||||||
restart|force-reload)
|
restart|force-reload)
|
||||||
echo -n "Restarting $DESC: $NAME"
|
echo -n "Restarting $tmuxwindowname: $NAME"
|
||||||
d_stop
|
d_stop
|
||||||
sleep 1
|
sleep 1
|
||||||
d_start
|
d_start
|
||||||
|
|||||||
Reference in New Issue
Block a user