resart timer, get rid of bash

This commit is contained in:
2025-06-20 23:45:50 -05:00
parent 5cd249610f
commit bea02293a7
+3 -9
View File
@@ -67,23 +67,17 @@
--console-address ":${toString opts.consolePort}"
'';
ExecStartPost = "${pkgs.bash}/bin/bash -c ''
for i in {1..30}; do
if ${pkgs.curl}/bin/curl -s http://localhost:${toString opts.dataPort}/minio/health/ready >/dev/null; then
break
fi
sleep 1
done
ExecStartPost = ''
${pkgs.minio-client}/bin/mc alias set local http://localhost:${toString opts.dataPort} \"$MINIO_ROOT_USER\" \"$MINIO_ROOT_PASSWORD\"
${pkgs.minio-client}/bin/mc mb --ignore-existing local/prod
${pkgs.minio-client}/bin/mc mb --ignore-existing local/dev
''";
'';
User = "minio";
Group = "minio";
EnvironmentFile = "${opts.credentialsFile}";
Restart = "always";
RestartSec = "5";
};
};