module: fix erpnext-web-init script
erpnext-web-init: line 6: install: command not found
This commit is contained in:
parent
44a0598bd1
commit
9c8a36de8b
|
@ -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 ''
|
||||
|
|
Loading…
Reference in a new issue