mirror of
https://github.com/atosatto/ansible-minio.git
synced 2024-11-21 11:15:18 +01:00
Systemd service: Restart=always (#36)
- add StartLimitIntervalSec and StartLimitBurst to avoid noisy crashloops
This commit is contained in:
parent
0bceb1d5d8
commit
c26ce825a9
@ -7,6 +7,10 @@ Wants=network-online.target
|
||||
After=network-online.target
|
||||
AssertFileIsExecutable={{ minio_server_bin }}
|
||||
|
||||
# Avoid noisy crashloops
|
||||
StartLimitIntervalSec=60
|
||||
StartLimitBurst=5
|
||||
|
||||
[Service]
|
||||
WorkingDirectory=/usr/local/
|
||||
|
||||
@ -20,8 +24,8 @@ ExecStartPre=/bin/bash -c "[ -n \"${MINIO_VOLUMES}\" ] || echo \"Variable MINIO_
|
||||
|
||||
ExecStart={{ minio_server_bin }} server $MINIO_OPTS $MINIO_VOLUMES
|
||||
|
||||
# Let systemd restart this service only if it has ended with the clean exit code or signal.
|
||||
Restart=on-success
|
||||
# Let systemd always restart this service, in limits defined by StartLimitIntervalSec and StartLimitBurst.
|
||||
Restart=always
|
||||
|
||||
StandardOutput=journal
|
||||
StandardError=inherit
|
||||
|
Loading…
Reference in New Issue
Block a user