summaryrefslogtreecommitdiffstats
path: root/playbooks/adhoc/deploy_monitoring_containers/oso-rhel7-zagg-client.service
blob: 381c7b4878996d2fae7568d476f1a1dccadccc9f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# This is a systemd file to run this docker container under systemd.
# To make this work:
#  * pull the image (probably from ops docker registry)
#  * place this file in /etc/systemd/system without the .systemd extension
#  * run the commands:
#  systemctl daemon-reload
#  systemctl enable zagg-client-docker
#  systemctl start zagg-client-docker
#
#
[Unit]
Description=Zagg Client Contatainer
Requires=docker.service
After=docker.service


[Service]
Type=simple
TimeoutStartSec=5m
#Slice=container-small.slice

ExecStartPre=-/usr/bin/docker rm "oso-rhel7-zagg-client"


ExecStart=/usr/bin/docker run --name oso-rhel7-zagg-client                               \
           -e ZAGG_SERVER=SERVERNAME                                                     \
           -e ZAGG_USER=USERNAME                                                         \
           -e ZAGG_PASSWORD=PASSWORD                                                     \
           -v /etc/localtime:/etc/localtime                                              \
           -v /run/pcp:/run/pcp                                                          \
           docker-registry.ops.rhcloud.com/ops/oso-rhel7-zagg-client


ExecReload=-/usr/bin/docker stop "oso-rhel7-zagg-client"
ExecReload=-/usr/bin/docker rm "oso-rhel7-zagg-client"
ExecStop=-/usr/bin/docker stop "oso-rhel7-zagg-client"

[Install]
WantedBy=default.target