diff --git a/Plugin/unraid/api/arrs.php b/Plugin/unraid/api/arrs.php index 32cc23c..3bede9c 100644 --- a/Plugin/unraid/api/arrs.php +++ b/Plugin/unraid/api/arrs.php @@ -9,7 +9,7 @@ if ($_action === 'refresh_remote') { if (!preg_match('/^host\d+$/', $host)) { echo json_encode(['ok' => false, 'error' => 'Invalid host']); exit; } - $script = SCRIPTS_DIR . '/Tools/remote_arr_cache_writer.sh'; + $script = dirname(__DIR__) . '/tools/remote_arr_cache_writer.sh'; if (!file_exists($script)) { echo json_encode(['ok' => false, 'error' => 'remote_arr_cache_writer.sh not found']); exit; } diff --git a/Plugin/unraid/api/storage.php b/Plugin/unraid/api/storage.php index 1739e28..32cef09 100644 --- a/Plugin/unraid/api/storage.php +++ b/Plugin/unraid/api/storage.php @@ -56,7 +56,7 @@ if ($action === 'migrate' && $_SERVER['REQUEST_METHOD'] === 'POST') { exit; } - $script = SCRIPTS_DIR . '/Tools/storage_migrate.sh'; + $script = dirname(__DIR__) . '/tools/storage_migrate.sh'; if (!file_exists($script)) { echo json_encode(['ok' => false, 'error' => 'storage_migrate.sh not found']); exit; diff --git a/Tools/api_cache_writer.php b/Plugin/unraid/tools/api_cache_writer.php similarity index 100% rename from Tools/api_cache_writer.php rename to Plugin/unraid/tools/api_cache_writer.php diff --git a/Tools/api_cache_writer.sh b/Plugin/unraid/tools/api_cache_writer.sh similarity index 100% rename from Tools/api_cache_writer.sh rename to Plugin/unraid/tools/api_cache_writer.sh diff --git a/Tools/conf_populate.sh b/Plugin/unraid/tools/conf_populate.sh similarity index 99% rename from Tools/conf_populate.sh rename to Plugin/unraid/tools/conf_populate.sh index e5323f3..6a4e6bb 100755 --- a/Tools/conf_populate.sh +++ b/Plugin/unraid/tools/conf_populate.sh @@ -41,7 +41,8 @@ # ============================================================================================== SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" -source "$SCRIPT_DIR/../load_config.sh" +source "$SCRIPT_DIR/../../../load_config.sh" +SCRIPTS_ROOT="$SCRIPTS_DIR" OVERWRITE=false NO_PUSH=false diff --git a/Tools/remote_arr_cache_writer.sh b/Plugin/unraid/tools/remote_arr_cache_writer.sh similarity index 99% rename from Tools/remote_arr_cache_writer.sh rename to Plugin/unraid/tools/remote_arr_cache_writer.sh index a44e06f..7d04f6a 100755 --- a/Tools/remote_arr_cache_writer.sh +++ b/Plugin/unraid/tools/remote_arr_cache_writer.sh @@ -26,7 +26,7 @@ # ============================================================================================== SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" -source "$SCRIPT_DIR/../load_config.sh" +source "$SCRIPT_DIR/../../../load_config.sh" parse_args "$@" acquire_lock diff --git a/Tools/storage_migrate.sh b/Plugin/unraid/tools/storage_migrate.sh similarity index 99% rename from Tools/storage_migrate.sh rename to Plugin/unraid/tools/storage_migrate.sh index 76d190e..eec1259 100755 --- a/Tools/storage_migrate.sh +++ b/Plugin/unraid/tools/storage_migrate.sh @@ -42,7 +42,7 @@ # ============================================================================================== SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" -source "$SCRIPT_DIR/../load_config.sh" +source "$SCRIPT_DIR/../../../load_config.sh" parse_args "$@" acquire_lock