mirror of
https://github.com/Foltik/dotfiles
synced 2024-11-27 21:19:51 -05:00
17 lines
285 B
Plaintext
17 lines
285 B
Plaintext
|
#!/bin/bash
|
||
|
|
||
|
PROG="${BLOCK_INSTANCE:-i3}"
|
||
|
|
||
|
PROG_REGEX="["$(echo "${PROG}" | cut -c 1)"]"$(echo "${PROG}" | cut -c 2-)" "
|
||
|
PROCESS=$(ps -eo pid,cmd | grep -w ${PROG_REGEX})
|
||
|
|
||
|
if [[ "${PROCESS}" ]]; then
|
||
|
echo "ok"
|
||
|
echo "ok"
|
||
|
echo ""
|
||
|
else
|
||
|
echo "na"
|
||
|
echo "na"
|
||
|
echo ""
|
||
|
exit 33
|
||
|
fi
|