app-admin/logstash-bin: fix permissions via initscript
authorTomáš Mózes <hydrapolic@gmail.com>
Thu, 29 Dec 2016 08:36:05 +0000 (08:36 +0000)
committerMichael Palimaka <kensington@gentoo.org>
Thu, 29 Dec 2016 12:18:15 +0000 (23:18 +1100)
app-admin/logstash-bin/files/logstash.initd4
app-admin/logstash-bin/logstash-bin-5.1.1-r1.ebuild [moved from app-admin/logstash-bin/logstash-bin-5.1.1.ebuild with 100% similarity]

index b9e9055ea7799bf1cdeb427a5853f6987a660c5f..00b732e8b8d24521180829b7416e4d6fe89d26ba 100644 (file)
@@ -54,10 +54,12 @@ start_pre() {
 
        rc_ulimit="-n ${LS_OPEN_FILES}"
 
-       checkpath -d -o "${LS_USER}":"${LS_GROUP}" -m750 "${LS_INSTALL_DIR}/data"
-       checkpath -d -o "${LS_USER}":"${LS_GROUP}" -m750 "$(dirname "${pidfile}")"
-       checkpath -d -o "${LS_USER}":"${LS_GROUP}" -m750 "${LS_LOG_DIR}"
-       checkpath -f -o "${LS_USER}":"${LS_GROUP}" -m640 "${LS_LOG_DIR}/logstash-plain.log"
+       local d
+       for d in "${LS_INSTALL_DIR}/data" "$(dirname "${pidfile}")" "${LS_LOG_DIR}"; do
+               checkpath -d -o "${LS_USER}":"${LS_GROUP}" -m750 "$d"
+               chown -R "${LS_USER}":"${LS_GROUP}" "$d"
+       done
+
 }
 
 stop() {