redis-client: add service to wait redis
This commit is contained in:
parent
8b3bcd14a1
commit
bb51db3e0a
3 changed files with 10 additions and 1 deletions
|
@ -1,7 +1,7 @@
|
||||||
<?xml version='1.0' encoding='UTF-8'?>
|
<?xml version='1.0' encoding='UTF-8'?>
|
||||||
<rougail version="0.10">
|
<rougail version="0.10">
|
||||||
<services>
|
<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/ca-trust/source/anchors/ca_Redis.crt</file>
|
||||||
<file>/etc/pki/tls/certs/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>
|
<file owner_type="variable" owner="redis_client_key_owner" mode="400">/etc/pki/tls/private/redis.key</file>
|
||||||
|
|
1
seed/redis-client/manual/image/preinstall/redis.sh
Normal file
1
seed/redis-client/manual/image/preinstall/redis.sh
Normal file
|
@ -0,0 +1 @@
|
||||||
|
PKG="$PKG redis"
|
8
seed/redis-client/templates/redis-client.service
Normal file
8
seed/redis-client/templates/redis-client.service
Normal 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'
|
Loading…
Reference in a new issue