summaryrefslogtreecommitdiff
path: root/valkey.service
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2024-10-18 00:58:25 +0000
committerCoprDistGit <infra@openeuler.org>2024-10-18 00:58:25 +0000
commit5f235febc4746e03919ce15b8d4fb0b69895aea2 (patch)
treedd75072a20a6b4958ca41aa5992d99715bc69a6a /valkey.service
parent04c70613ebc1a9998bc78d65bb694a5c72558722 (diff)
automatic import of valkey
Diffstat (limited to 'valkey.service')
-rw-r--r--valkey.service22
1 files changed, 22 insertions, 0 deletions
diff --git a/valkey.service b/valkey.service
new file mode 100644
index 0000000..b7d58f3
--- /dev/null
+++ b/valkey.service
@@ -0,0 +1,22 @@
+[Unit]
+Description=Valkey persistent key-value database
+After=network.target
+After=network-online.target
+Wants=network-online.target
+
+[Service]
+WorkingDirectory=/var/lib/valkey
+EnvironmentFile=-/etc/sysconfig/valkey
+# moved $OPTIONS to start because the --dir option only overrides the config if it is passed before
+# the config to the binary. I think this is a bug and will be reporting it upstream as all other
+# opts don't care about the order for the override to work
+ExecStart=/usr/bin/valkey-server /etc/valkey/valkey.conf --daemonize no --supervised systemd $OPTIONS
+Type=notify
+User=valkey
+Group=valkey
+RuntimeDirectory=valkey
+RuntimeDirectoryMode=0755
+
+[Install]
+WantedBy=multi-user.target
+