minio/dist/linux-systemd/minio.service

51 lines
1.3 KiB
SYSTEMD
Raw Normal View History

2016-07-11 06:55:40 -04:00
[Unit]
Description=Minio
Documentation=https://docs.minio.io
2016-07-11 06:55:40 -04:00
Wants=network-online.target
After=network-online.target
AssertPathExists=/etc/minio/
AssertFileIsExecutable=/usr/share/minio/bin/minio
[Service]
WorkingDirectory=/usr/share/minio/
User=minio
Group=minio
PermissionsStartOnly=true
EnvironmentFile=-/etc/default/minio
ExecStartPre=/bin/bash -c "[ -n \"${MINIO_VOLUMES}\" ] || echo \"Variable MINIO_VOLUMES not set in /etc/defaults/minio\""
ExecStartPre=/bin/bash -c "(for i in $MINIO_VOLUMES; do if [ ! -d $i ]; then echo \"Directory $i of variable MINIO_VOLUMES isn't an existing directory\" && false; exit; fi; done)"
ExecStartPre=-/bin/chown -R root:minio /etc/minio/
ExecStartPre=-/bin/chmod -R 660 /etc/minio/
ExecStartPre=-/bin/chmod -R ug+X /etc/minio/
ExecStart=/usr/share/minio/bin/minio \
--config-dir "/etc/minio/" \
server \
$MINIO_OPTS \
$MINIO_VOLUMES
StandardOutput=journal
StandardError=inherit
# Specifies the maximum file descriptor number that can be opened by this process
LimitNOFILE=65536
# Disable timeout logic and wait until process is stopped
TimeoutStopSec=0
# SIGTERM signal is used to stop Minio
KillSignal=SIGTERM
SendSIGKILL=no
SuccessExitStatus=0
[Install]
WantedBy=multi-user.target
# Built for ${project.name}-${project.version} (${project.name})