From 6e2f2b08f376ec715eb0eea2b41a8636ea2117da Mon Sep 17 00:00:00 2001 From: Donkie Date: Sun, 22 Oct 2023 20:12:23 +0200 Subject: [PATCH] Added systemd path verification to install script --- scripts/install_debian.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/scripts/install_debian.sh b/scripts/install_debian.sh index db5bef3..441ac50 100644 --- a/scripts/install_debian.sh +++ b/scripts/install_debian.sh @@ -168,6 +168,19 @@ if [ "$choice" == "y" ] || [ "$choice" == "Y" ]; then script_dir=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) spoolman_dir=$(dirname "$script_dir") + # Verify that we found the right spoolman dir by checking for the existence of pyproject.toml + if [ ! -f "$spoolman_dir/pyproject.toml" ]; then + echo -e "${ORANGE}Could not automatically find the Spoolman directory. Please specify the path to the Spoolman directory (the directory containing pyproject.toml):${NC}" + read spoolman_dir + # Expand the path + spoolman_dir=$(eval echo "$spoolman_dir") + # Verify again + if [ ! -f "$spoolman_dir/pyproject.toml" ]; then + echo -e "${ORANGE}Could not find pyproject.toml in $spoolman_dir. Aborting installation.${NC}" + exit 1 + fi + fi + # Define the systemd service unit file service_unit="[Unit] Description=Spoolman