redis-client: add service to wait redis

This commit is contained in:
Emmanuel Garette 2022-10-17 18:18:58 +02:00
parent 8b3bcd14a1
commit bb51db3e0a
3 changed files with 10 additions and 1 deletions

View file

@ -1,7 +1,7 @@
<?xml version='1.0' encoding='UTF-8'?>
<rougail version="0.10">
<services>
<service name="redisclient" manage="False">
<service name="redis-client" target="risotto" engine="creole">
<file>/etc/pki/ca-trust/source/anchors/ca_Redis.crt</file>
<file>/etc/pki/tls/certs/redis.crt</file>
<file owner_type="variable" owner="redis_client_key_owner" mode="400">/etc/pki/tls/private/redis.key</file>

View file

@ -0,0 +1 @@
PKG="$PKG redis"

View file

@ -0,0 +1,8 @@
[Unit]
After=network-online.target
Before=risotto.target
[Service]
Type=oneshot
User=%%redis_client_key_owner
ExecStart=/usr/bin/timeout 90 bash -c 'while ! /usr/bin/redis-cli --tls -a %%redis_client_password --cacert /etc/pki/ca-trust/source/anchors/ca_Redis.crt --cert /etc/pki/tls/certs/redis.crt --key /etc/pki/tls/private/redis.key -h %%redis_client_server_domainname -p 6380 PING; do sleep 1; done'