From 8f9cb84f1ccc8ecdfdda6dd10e19fe75a3e3e399 Mon Sep 17 00:00:00 2001 From: Eric Schultz Date: Tue, 9 Mar 2021 16:59:02 -0700 Subject: [PATCH] fix: use 'stop' cli command to stop unraid-api service --- dynamix.unraid.net.plg | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/dynamix.unraid.net.plg b/dynamix.unraid.net.plg index 2c17b25ea..7e57c3133 100644 --- a/dynamix.unraid.net.plg +++ b/dynamix.unraid.net.plg @@ -178,8 +178,9 @@ startdebug() { } stop() { if [ -f "$node_base_directory/unraid-api/unraid-api" ]; then - $node_base_directory/unraid-api/unraid-api stop + $node_base_directory/unraid-api/unraid-api stop || true fi + kill -9 $(pidof unraid-api) || true } reload() { $node_base_directory/unraid-api/unraid-api restart @@ -205,7 +206,7 @@ _install() { } install() { # Stop old process - kill -9 $(pidof unraid-api) + stop # Install the files _install @@ -221,7 +222,7 @@ install() { exit 0 } uninstall() { - kill -9 $(pidof unraid-api) + stop for download in ${downloads[@]}; do rm -rf $node_base_directory/${download} done