From 080365dd22b967274833f50a5cd0cccc0790a658 Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Sat, 11 Apr 2020 10:03:33 -0400 Subject: pgrep is a little slow, slower than ps | grep --- .local/bin/torwrap | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.local/bin/torwrap') diff --git a/.local/bin/torwrap b/.local/bin/torwrap index 2e42c87..82a268a 100755 --- a/.local/bin/torwrap +++ b/.local/bin/torwrap @@ -2,6 +2,6 @@ ifinstalled tremc transmission-cli || exit -! pgrep -x transmission-da >/dev/null && transmission-daemon && notify-send "Starting torrent daemon..." && sleep 3 && pkill -RTMIN+7 "${STATUSBAR:-dwmblocks}" +! ps ax | grep -q "\stransmission-daemon$" && transmission-daemon && notify-send "Starting torrent daemon..." && sleep 3 && pkill -RTMIN+7 "${STATUSBAR:-dwmblocks}" & $TERMINAL -e tremc -- cgit v1.3.1