[app-admin/loki] interim version, not really tested.

This commit is contained in:
2025-11-28 13:45:03 +01:00
parent d1cf9f63fd
commit ec1e6aa230
6 changed files with 113 additions and 0 deletions

View File

@@ -0,0 +1,5 @@
# The loki config file
LOKI_CONF="/etc/loki/loki-local-config.yaml"
# Add any extra options to pass to loki to this setting.
#LOKI_OPTS=""

View File

@@ -0,0 +1,11 @@
#!/sbin/openrc-run
configfile="${LOKI_CONF:-/etc/loki/loki-local-config.yaml}"
command=/usr/bin/loki
command_args="-config.file=${configfile}
${LOKI_OPTS}"
command_background=yes
command_user=loki:grafana
make_pidfile=yes
pidfile=/var/run/loki.pid

View File

@@ -0,0 +1,17 @@
[Unit]
Description=Loki
Wants=network-online.target
After=network-online.target
[Service]
User=loki
Group=grafana
Type=simple
Restart=on-failure
EnvironmentFile=/etc/conf.d/loki
Environment=LOKI_CONF=/etc/loki/loki-local-config.yaml
ExecStart=/usr/bin/loki -config.file=${LOKI_CONF} ${LOKI_OPTS}
PIDFile=/run/loki.pid
[Install]
WantedBy=multi-user.target