diff options
author | Mikle Kolyada <zlogene@gentoo.org> | 2021-01-26 19:27:31 +0300 |
---|---|---|
committer | Mikle Kolyada <zlogene@gentoo.org> | 2021-01-26 19:28:16 +0300 |
commit | 484871c90391456c214eff7d25c3d6a8295b0fe9 (patch) | |
tree | 6967c0f522c83d35e84a860aacb2bc3dfa6b7520 /net-fs | |
parent | app-backup/backupninja: bump to 1.2.1 and new homepage (diff) | |
download | gentoo-484871c90391456c214eff7d25c3d6a8295b0fe9.tar.gz gentoo-484871c90391456c214eff7d25c3d6a8295b0fe9.tar.bz2 gentoo-484871c90391456c214eff7d25c3d6a8295b0fe9.zip |
net-fs/minio: add systemd support
Package-Manager: Portage-3.0.13, Repoman-3.0.2
Signed-off-by: Mikle Kolyada <zlogene@gentoo.org>
Diffstat (limited to 'net-fs')
-rw-r--r-- | net-fs/minio/files/minio.default | 4 | ||||
-rw-r--r-- | net-fs/minio/files/minio.service | 30 | ||||
-rw-r--r-- | net-fs/minio/minio-2021.01.16.02.19.44-r2.ebuild (renamed from net-fs/minio/minio-2021.01.16.02.19.44-r1.ebuild) | 15 |
3 files changed, 45 insertions, 4 deletions
diff --git a/net-fs/minio/files/minio.default b/net-fs/minio/files/minio.default new file mode 100644 index 000000000000..769e01950b22 --- /dev/null +++ b/net-fs/minio/files/minio.default @@ -0,0 +1,4 @@ +MINIO_ACCESS_KEY="minio" +MINIO_VOLUMES="/var/lib/minio" +MINIO_OPTS="-C /etc/minio --address 127.0.0.1:9000" +MINIO_SECRET_KEY="miniostorage" diff --git a/net-fs/minio/files/minio.service b/net-fs/minio/files/minio.service new file mode 100644 index 000000000000..21ee9f4768fd --- /dev/null +++ b/net-fs/minio/files/minio.service @@ -0,0 +1,30 @@ +[Unit] +Description=MinIO +Documentation=https://docs.min.io +Wants=network-online.target +After=network-online.target +AssertFileIsExecutable=/usr/bin/minio + +[Service] +User=minio +Group=minio + +EnvironmentFile=/etc/default/minio +ExecStartPre=/bin/sh -c "if [ -z \"${MINIO_VOLUMES}\" ]; then echo \"Variable MINIO_VOLUMES not set in /etc/default/minio\"; exit 1; fi" + +ExecStart=/usr/bin/minio server $MINIO_OPTS $MINIO_VOLUMES + +# Let systemd restart this service always +Restart=always + +# 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=infinity +SendSIGKILL=no + +[Install] +WantedBy=multi-user.target + +# Built for ${project.name}-${project.version} (${project.name}) diff --git a/net-fs/minio/minio-2021.01.16.02.19.44-r1.ebuild b/net-fs/minio/minio-2021.01.16.02.19.44-r2.ebuild index 3c67daa84cd5..78d4e7e62801 100644 --- a/net-fs/minio/minio-2021.01.16.02.19.44-r1.ebuild +++ b/net-fs/minio/minio-2021.01.16.02.19.44-r2.ebuild @@ -3,7 +3,7 @@ EAPI=7 -inherit go-module +inherit go-module systemd MY_PV="$(ver_cut 1-3)T$(ver_cut 4-7)Z" MY_PV=${MY_PV//./-} @@ -946,8 +946,15 @@ src_compile() { src_install() { dobin minio + + insinto /etc/defult + doins "${FILESDIR}"/minio.default + dodoc -r README.md CONTRIBUTING.md docs - newinitd "${FILESDIR}"/${PN}.initd ${PN} - keepdir /var/{lib,log}/${PN} - fowners ${PN}:${PN} /var/{lib,log}/${PN} + + systemd_dounit "${FILESDIR}"/minio.service + newinitd "${FILESDIR}"/minio.initd minio + + keepdir /var/{lib,log}/minio + fowners minio:minio /var/{lib,log}/minio } |