From 0ee2c50a97ffb85dcf1791a8016915481cb7ce29 Mon Sep 17 00:00:00 2001 From: root Date: Fri, 7 Jan 2022 16:25:16 -0800 Subject: [PATCH] Fix some inquisitor remote copy issues --- inquisitor.nix | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/inquisitor.nix b/inquisitor.nix index cb6898a..c7bbf61 100644 --- a/inquisitor.nix +++ b/inquisitor.nix @@ -5,14 +5,19 @@ let inquisitorSource = pkgs.fetchFromGitHub { owner = "Jaculabilis"; repo = "Inquisitor"; - rev = "5d0c5b1ae33b06a2dd82befcbefd02ad03d742f3"; - sha256 = "02ldawycs6wf4y9d94y0f2mhsjfy7kp6j779bia7akyy4iihrib4"; + rev = "a6d961aba948d3a682dbde12dbaa8805eadbbd84"; + sha256 = "10n6c5zvi27f92b7am0rrdizxz0mlp3rw1y1jyd44b57ykk7x6fr"; }; inquisitor = pkgs.callPackage inquisitorSource {}; # Define the inquisitor data directory inquisiDir = "/var/lib/inquisitor"; + # Define an scp helper for executing in cron jobs + scp-helper = pkgs.writeShellScriptBin "scp-helper" '' + ${pkgs.openssh}/bin/scp -i ${inquisiDir}/inquisitor.key -oStrictHostKeyChecking=no "$@" + ''; + # Define the inquisitor service user inquisitorUser = { name = "inquisitor"; @@ -46,6 +51,12 @@ let # Ensure the service owns the folders chown -R ${inquisitorUser.name} ${inquisiDir} + + # Ensure the scp helper is present + if [ -f ${inquisiDir}/scp-helper ]; then + rm ${inquisiDir}/scp-helper + fi + ln -s -t ${inquisiDir} ${scp-helper}/bin/scp-helper ''; # Create a run script for the server @@ -54,6 +65,7 @@ let ${inquisitor}/bin/gunicorn \ --bind=localhost:24133 \ --workers=4 \ + --timeout 120 \ --log-level debug \ "inquisitor.app:wsgi()" '';