Switch branches/tags
Nothing to show
Find file History
harshavardhana Fix the bug in service Pre check handling
Previous commits while fixing the truthy issue of pre-check
introduced a bug in the handling of the environment variables.

In bash "cond1 && cond2" should be both true to have an exit value
of '0' since when the env is not set both become true since the
printing is successful as well. Which means that if the MINIO_VOLUMES
is not set the statement 'cond1 && cond2' was true i.e exit status '0'.

Once the MINIO_VOLUMES is set the statement 'cond1 && cond2' becomes
false i.e exit status '1'.

This is a tricky bash behavior to understand, to avoid this we simply
use explicit exit status and also use `if` conditions to provide
more clarity.
Latest commit 10e52df Nov 7, 2018


Systemd service for Minio

Systemd script for Minio server.


Create default configuration

This file serves as input to Minio systemd service. Use this file to add MINIO_VOLUMES with the correct paths, MINIO_OPTS to add Minio server options like config-dir, address. Minio credentials can be MINIO_ACCESS_KEY and MINIO_SECRET_KEY in this file as well.

$ cat <<EOT >> /etc/default/minio
# Volume to be used for Minio server.
# Use if you want to run Minio on a custom port.
MINIO_OPTS="--address :9199"
# Access Key of the server.
# Secret key of the server.



Download minio.service in /etc/systemd/system/

( cd /etc/systemd/system/; curl -O https://raw.githubusercontent.com/minio/minio-service/master/linux-systemd/minio.service )

Enable startup on boot

systemctl enable minio.service

Disable Minio service

systemctl disable minio.service


  • Replace User=minio-user and Group=minio-user in minio.service file with your local setup.
  • Ensure that MINIO_VOLUMES source has appropirate write access.