module: fix erpnext-web-init script

erpnext-web-init: line 6: install: command not found
This commit is contained in:
teutat3s 2023-07-18 01:54:43 +02:00
parent 44a0598bd1
commit 9c8a36de8b
Signed by: teutat3s
GPG key ID: 4FA1D3FA524F22C1

View file

@ -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 ''