Skip to content
This repository has been archived by the owner on Jun 28, 2023. It is now read-only.

Commit

Permalink
check exit code from rtorrent, as initplugins.sh blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
binhex committed Sep 18, 2020
1 parent 4aeb0bb commit 3215620
Showing 1 changed file with 23 additions and 4 deletions.
27 changes: 23 additions & 4 deletions run/nobody/watchdog.sh
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,18 @@ while true; do
# run script to start rtorrent, it can also perform shutdown of rtorrent if its already running (required for port/ip change)
source /home/nobody/rtorrent.sh

# run script to initialise rutorrent plugins
source /home/nobody/initplugins.sh
# if the exit code is non 0 (bad vpn_ip due to remote server change?) then skip initplugins.sh as this will block
if [[ "${?}" -ne 0 ]]; then

echo "[warn] Failed to start rTorrent, skipping initialisation of ruTorrent Plugins..."

else

# run script to initialise rutorrent plugins
source /home/nobody/initplugins.sh

fi


fi

Expand Down Expand Up @@ -219,8 +229,17 @@ while true; do
# run script to start rtorrent
source /home/nobody/rtorrent.sh

# run script to initialise rutorrent plugins
source /home/nobody/initplugins.sh
# if the exit code is non 0 (bad vpn_ip due to remote server change?) then skip initplugins.sh as this will block
if [[ "${?}" -ne 0 ]]; then

echo "[warn] Failed to start rTorrent, skipping initialisation of ruTorrent Plugins..."

else

# run script to initialise rutorrent plugins
source /home/nobody/initplugins.sh

fi

fi

Expand Down

0 comments on commit 3215620

Please sign in to comment.