From 7650e0c2a5e32619496e9856b2b69f0b589e35dd Mon Sep 17 00:00:00 2001 From: Marcel Date: Sun, 18 Feb 2024 19:10:45 +0100 Subject: [PATCH] readme cleanup --- README.md | 2 -- module.nix | 6 +++--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index c891a31..ab248c2 100644 --- a/README.md +++ b/README.md @@ -8,11 +8,9 @@ Nix Module for [IXP-Manager](https://www.ixpmanager.org/). { inputs = { nixpkgs.url = "github:nixos/nixpkgs/nixos-23.11"; - flake-utils.url = "github:numtide/flake-utils"; ixp-manager = { url = "github:dd-ix/ixp-manager.nix"; inputs.nixpkgs.follows = "nixpkgs"; - inputs.flake-utils.follows = "flake-utils"; }; }; diff --git a/module.nix b/module.nix index 900f573..8106622 100644 --- a/module.nix +++ b/module.nix @@ -419,7 +419,7 @@ in ExecStartPre = mkIf cfg.createDatabaseLocally [ "!${pkgs.writeShellScript "librenms-db-init" '' DB_PASSWORD=$(${pkgs.envsubst}/bin/envsubst -i ${configFile} | grep DB_PASSWORD | sed s/DB_PASSWORD=//g | sed s/\"//g) - echo "ALTER USER ${cfg.settings.DB_USERNAME}@localhost IDENTIFIED WITH caching_sha2_password BY '$DB_PASSWORD';" | ${pkgs.mysql80}/bin/mysql -u root + echo "ALTER USER ${cfg.settings.DB_USERNAME}@localhost IDENTIFIED WITH caching_sha2_password BY \"''$DB_PASSWORD\"";" | ${pkgs.mysql80}/bin/mysql -u root ''}" ]; }; @@ -461,7 +461,7 @@ in ${artisanWrapper}/bin/ixp-manager-artisan migrate --force # regenerate views - mysql -h $DB_HOST -u $DB_USERNAME -p$DB_PASSWORD $DB_DATABASE < ${package}/tools/sql/views.sql + mysql -h ''$DB_HOST -u ''$DB_USERNAME -p''$DB_PASSWORD ''$DB_DATABASE < ${package}/tools/sql/views.sql # version file empty --> initial installation if [[ ! -s ${cfg.dataDir}/version ]]; then @@ -473,7 +473,7 @@ in HASH_PW=$( ${phpPackage}/bin/php -r "echo escapeshellarg( crypt( '$IXPM_ADMIN_PW', sprintf( '\$2a\$%02d\$%s', 10, substr( '$ADMIN_PW_SALT', 0, 22 ) ) ) );" ) # snippet from https://docs.ixpmanager.org/install/manually/ - mysql -h $DB_HOST -u $DB_USERNAME "-p$DB_PASSWORD" $DB_DATABASE <