From 9c8a36de8b9c1a379528ed35365f69fdca14677c Mon Sep 17 00:00:00 2001 From: teutat3s Date: Tue, 18 Jul 2023 01:54:43 +0200 Subject: [PATCH] module: fix erpnext-web-init script erpnext-web-init: line 6: install: command not found --- modules/erpnext.nix | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/modules/erpnext.nix b/modules/erpnext.nix index 4ed8df3..5e73e82 100644 --- a/modules/erpnext.nix +++ b/modules/erpnext.nix @@ -335,7 +335,7 @@ in environment = { PYTHON_PATH = "${penv}/${pkgs.python3.sitePackages}"; }; - path = [ pkgs.mariadb-client penv ]; + path = [ pkgs.mariadb-client penv pkgs.coreutils ]; serviceConfig = defaultServiceConfig // { TimeoutStartSec = "300s"; Restart = "on-failure"; @@ -345,14 +345,14 @@ in # Fail on error set -e - install -m0600 ${commonSiteConfigFile} ${cfg.benchDir}/sites/common_site_config.json + ${pkgs.coreutils}/bin/install -m0600 ${commonSiteConfigFile} ${cfg.benchDir}/sites/common_site_config.json ${pkgs.replace-secret}/bin/replace-secret \ '#NIXOS_ERPNEXT_DB_USER_PASSWORD#' \ ${cfg.database.userPasswordFile} \ ${cfg.benchDir}/sites/common_site_config.json - ADMIN_PASSWORD="$(cat "${cfg.adminPasswordFile}")" - DB_ROOT_PASSWORD="$(cat "${cfg.database.rootPasswordFile}")" + ADMIN_PASSWORD="$(${pkgs.coreutils}/bin/cat "${cfg.adminPasswordFile}")" + DB_ROOT_PASSWORD="$(${pkgs.coreutils}/bin/cat "${cfg.database.rootPasswordFile}")" # Upstream initializes the database with this command ${penv}/bin/bench new-site ${cfg.domain} \ @@ -360,7 +360,7 @@ in --admin-password "$ADMIN_PASSWORD" \ --install-app erpnext - touch ${escapeShellArg "${cfg.workDir}/.db-created"} + ${pkgs.coreutils}/bin/touch ${escapeShellArg "${cfg.workDir}/.db-created"} fi ${lib.optionalString cfg.database.automaticMigrations ''