blockcheck: warn if zapret processes already running

This commit is contained in:
bol-van
2024-10-02 12:38:38 +03:00
parent 4733e1a15e
commit 32158541b1
2 changed files with 37 additions and 0 deletions

View File

@@ -313,6 +313,22 @@ shell_name()
}
}
process_exists()
{
if exists pgrep; then
pgrep ^$1$ >/dev/null
elif exists pidof; then
pidof $1 >/dev/null
else
return 1
fi
}
win_process_exists()
{
tasklist /NH /FI "IMAGENAME eq ${1}.exe" | grep -q "^${1}.exe"
}
std_ports()
{
HTTP_PORTS=${HTTP_PORTS:-80}