forked from axeman/erpnext-nix
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 = {
|
environment = {
|
||||||
PYTHON_PATH = "${penv}/${pkgs.python3.sitePackages}";
|
PYTHON_PATH = "${penv}/${pkgs.python3.sitePackages}";
|
||||||
};
|
};
|
||||||
path = [ pkgs.mariadb-client penv ];
|
path = [ pkgs.mariadb-client penv pkgs.coreutils ];
|
||||||
serviceConfig = defaultServiceConfig // {
|
serviceConfig = defaultServiceConfig // {
|
||||||
TimeoutStartSec = "300s";
|
TimeoutStartSec = "300s";
|
||||||
Restart = "on-failure";
|
Restart = "on-failure";
|
||||||
|
@ -345,14 +345,14 @@ in
|
||||||
# Fail on error
|
# Fail on error
|
||||||
set -e
|
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 \
|
${pkgs.replace-secret}/bin/replace-secret \
|
||||||
'#NIXOS_ERPNEXT_DB_USER_PASSWORD#' \
|
'#NIXOS_ERPNEXT_DB_USER_PASSWORD#' \
|
||||||
${cfg.database.userPasswordFile} \
|
${cfg.database.userPasswordFile} \
|
||||||
${cfg.benchDir}/sites/common_site_config.json
|
${cfg.benchDir}/sites/common_site_config.json
|
||||||
|
|
||||||
ADMIN_PASSWORD="$(cat "${cfg.adminPasswordFile}")"
|
ADMIN_PASSWORD="$(${pkgs.coreutils}/bin/cat "${cfg.adminPasswordFile}")"
|
||||||
DB_ROOT_PASSWORD="$(cat "${cfg.database.rootPasswordFile}")"
|
DB_ROOT_PASSWORD="$(${pkgs.coreutils}/bin/cat "${cfg.database.rootPasswordFile}")"
|
||||||
|
|
||||||
# Upstream initializes the database with this command
|
# Upstream initializes the database with this command
|
||||||
${penv}/bin/bench new-site ${cfg.domain} \
|
${penv}/bin/bench new-site ${cfg.domain} \
|
||||||
|
@ -360,7 +360,7 @@ in
|
||||||
--admin-password "$ADMIN_PASSWORD" \
|
--admin-password "$ADMIN_PASSWORD" \
|
||||||
--install-app erpnext
|
--install-app erpnext
|
||||||
|
|
||||||
touch ${escapeShellArg "${cfg.workDir}/.db-created"}
|
${pkgs.coreutils}/bin/touch ${escapeShellArg "${cfg.workDir}/.db-created"}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
${lib.optionalString cfg.database.automaticMigrations ''
|
${lib.optionalString cfg.database.automaticMigrations ''
|
||||||
|
|
Loading…
Reference in a new issue