resart timer, get rid of bash
This commit is contained in:
1 parent
5cd249610f
commit
bea02293a7
1 file changed
+3
-9
@@ -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";
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
Reference in new issue
Block a user