dgy
/
hexagons
Archived
1
0
Fork 0
This repository has been archived on 2021-03-24. You can view files and clone it, but cannot push or open issues or pull requests.
hexagons/.local/bin/tsb

19 lines
402 B
Bash
Executable File

#!/usr/bin/env bash
set -euf -o pipefail
TRANS_PID=$(pidof transmission-daemon)
if [[ $TRANS_PID ]]; then
echo "$(tput setaf 1) Stopping Transmission Daemon"
killall transmission-daemon 2> /dev/null ;
echo "$(tput setaf 3) Updating Blocklist"
tblock
echo "$(tput setaf 2) Restarting Transmission Daemon"
tsd
fi
if [[ ! $TRANS_PID ]]; then
echo "$(tput setaf 3) Updating Blocklist"
tblock
fi