|
@@ -17,7 +17,7 @@ case "${1}" in
|
|
|
|
|
|
"stop")
|
|
|
# Stop zoomctl
|
|
|
- pkill zoomctl start
|
|
|
+ kill $(ps a | grep -v grep | grep "zoomctl start" | cut --field=2 --delim=' ')
|
|
|
|
|
|
# Stop xfreerdp
|
|
|
/usr/local/bin/xfreerdpctl stop -a
|
|
@@ -27,11 +27,15 @@ case "${1}" in
|
|
|
;;
|
|
|
|
|
|
"status")
|
|
|
- if ps a | grep --quiet zoomctl start; then
|
|
|
+ if ps a | grep -v grep | grep --quiet "zoomctl start"; then
|
|
|
echo "zoomctl is running"
|
|
|
else
|
|
|
echo "zoomctl is not running"
|
|
|
fi
|
|
|
;;
|
|
|
|
|
|
+*)
|
|
|
+ echo "Usage: ${0} {start|stop|status}." >&2
|
|
|
+ exit 1
|
|
|
+ ;;
|
|
|
esac
|