212 current 2025-10-10 03:46:48 25.05.20251006.20c4598 6.12.50 *
This commit is contained in:
@@ -82,10 +82,15 @@ in
|
|||||||
ensureUsers = [
|
ensureUsers = [
|
||||||
{
|
{
|
||||||
name = "minecraft_recpro";
|
name = "minecraft_recpro";
|
||||||
passwordFile = sec."minecraft_recpro_db_passwd".path;
|
|
||||||
ensurePermissions = { "minecraft_recpro_db.*" = "ALL PRIVILEGES"; };
|
ensurePermissions = { "minecraft_recpro_db.*" = "ALL PRIVILEGES"; };
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
initialScript = pkgs.writeText "minecraft_recpro-init.sql" ''
|
||||||
|
CREATE DATABASE IF NOT EXISTS minecraft_recpro_db;
|
||||||
|
CREATE USER IF NOT EXISTS 'minecraft_recpro'@'localhost' IDENTIFIED BY '${builtins.readFile /run/secrets/minecraft_recpro_db_passwd}';
|
||||||
|
GRANT ALL PRIVILEGES ON minecraft_recpro.* TO 'minecraft_recpro'@'localhost';
|
||||||
|
FLUSH PRIVILEGES;
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
# open firewall
|
# open firewall
|
||||||
|
|||||||
Reference in New Issue
Block a user