resart timer, get rid of bash
This commit is contained in:
@@ -67,23 +67,17 @@
|
|||||||
--console-address ":${toString opts.consolePort}"
|
--console-address ":${toString opts.consolePort}"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
ExecStartPost = "${pkgs.bash}/bin/bash -c ''
|
ExecStartPost = ''
|
||||||
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
|
|
||||||
|
|
||||||
${pkgs.minio-client}/bin/mc alias set local http://localhost:${toString opts.dataPort} \"$MINIO_ROOT_USER\" \"$MINIO_ROOT_PASSWORD\"
|
${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/prod
|
||||||
${pkgs.minio-client}/bin/mc mb --ignore-existing local/dev
|
${pkgs.minio-client}/bin/mc mb --ignore-existing local/dev
|
||||||
''";
|
'';
|
||||||
|
|
||||||
User = "minio";
|
User = "minio";
|
||||||
Group = "minio";
|
Group = "minio";
|
||||||
EnvironmentFile = "${opts.credentialsFile}";
|
EnvironmentFile = "${opts.credentialsFile}";
|
||||||
Restart = "always";
|
Restart = "always";
|
||||||
|
RestartSec = "5";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user