From 690c7186c84ccabb8838c2c7be91319e0171395f Mon Sep 17 00:00:00 2001 From: Xipmix Date: Fri, 22 Dec 2017 21:44:53 +1100 Subject: [PATCH 1/2] Call the correct function when vstop argument is given No 'stop' function is defined. It's 'vstop' --- .../system_controller/volumio_command_line_client/volumio.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/plugins/system_controller/volumio_command_line_client/volumio.sh b/app/plugins/system_controller/volumio_command_line_client/volumio.sh index 19a67e965..4f082410e 100755 --- a/app/plugins/system_controller/volumio_command_line_client/volumio.sh +++ b/app/plugins/system_controller/volumio_command_line_client/volumio.sh @@ -135,11 +135,11 @@ case "$1" in ;; vstop) - stop + vstop ;; restart) - stop + vstop start ;; From cd38c5e5cf873b49637b14d79dc630643d41ba7e Mon Sep 17 00:00:00 2001 From: Xipmix Date: Fri, 22 Dec 2017 21:47:57 +1100 Subject: [PATCH 2/2] Prefix all the Volumio Service Comands with 'v' This should reduce potential confusion between these functions and commands related to music playback. --- .../volumio_command_line_client/volumio.sh | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/app/plugins/system_controller/volumio_command_line_client/volumio.sh b/app/plugins/system_controller/volumio_command_line_client/volumio.sh index 4f082410e..d4bd6e23a 100755 --- a/app/plugins/system_controller/volumio_command_line_client/volumio.sh +++ b/app/plugins/system_controller/volumio_command_line_client/volumio.sh @@ -33,9 +33,9 @@ clear [[VOLUMIO SERVICE CONTROL]] -start Starts Volumio Service +vstart Starts Volumio Service vstop Stops Volumio Service -restart Restarts Volumio Service +vrestart Restarts Volumio Service [[VOLUMIO DEVELOPMENT]] @@ -55,7 +55,7 @@ plugin update updates the plugin #VOLUMIO SERVICE CONTROLS -start() { +vstart() { echo volumio | sudo -S systemctl start volumio.service } @@ -127,20 +127,20 @@ case "$1" in stopairplay) /usr/bin/curl "http://127.0.0.1:3000/api/v1/commands/?cmd=stopAirplay" ;; - start) - start + vstart) + vstart ;; - start) - start + vstart) + vstart ;; vstop) vstop ;; - restart) + vrestart) vstop - start + vstart ;; status)