postgresql = {
commands = {
check_postgresql_replication = "${sudo} -u postgres $USER2$/check_postgres_replication \"$ARG1$\" \"$ARG2$\" \"$ARG3$\"";
+ check_postgresql_database_count = "$USER2$/check_postgres_database_count \"$ARG1$\" \"$ARG2$\" \"$ARG3$\"";
};
chunk = let
postgresqlBinary = if config.myServices.databasesReplication.postgresql.enable
wrapProgram $out/check_postgres_replication --prefix PATH : ${lib.makeBinPath [
postgresqlBinary
]}
+ cp ${./plugins}/check_postgres_database_count $out/
+ patchShebangs $out/check_postgres_database_count
+ wrapProgram $out/check_postgres_database_count --prefix PATH : ${lib.makeBinPath [
+ postgresqlBinary
+ ]}
'';
sudo = myplugins: {