From 9f914614a9d794df49cf89d0a10a9ca9d5862ab8 Mon Sep 17 00:00:00 2001 From: shockrah Date: Thu, 8 Oct 2020 15:26:01 -0700 Subject: [PATCH] checking for server pressence --- music | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/music b/music index f3391ce..e6ea615 100755 --- a/music +++ b/music @@ -1,6 +1,12 @@ #!/bin/sh -# TODO: what +# Start the mocp server if its not there yet + +proc_id=`pgrep moc` +if [ -z $proc_id ]; then + mocp --server +fi + if [ ! $1 = "" ]; then echo Args: $@ # start X pause volume_set