Add ocid.service

Signed-off-by: Dan Walsh <dwalsh@redhat.com>
This commit is contained in:
Dan Walsh 2016-10-12 08:21:32 -04:00
parent 78438e0ec6
commit 72b192c4cf
3 changed files with 28 additions and 0 deletions

1
.gitignore vendored
View file

@ -7,3 +7,4 @@ pause/pause.o
/docs/ocid.8 /docs/ocid.8
/docs/ocid.conf.5 /docs/ocid.conf.5
vendor/src/github.com/kubernetes-incubator/cri-o vendor/src/github.com/kubernetes-incubator/cri-o
ocid.conf

View file

@ -92,8 +92,12 @@ install:
install -m 644 $(wildcard docs/*.8.md) $(PREFIX)/share/man/man8 install -m 644 $(wildcard docs/*.8.md) $(PREFIX)/share/man/man8
install -d $(PREFIX)/share/man/man5 install -d $(PREFIX)/share/man/man5
install -m 644 $(wildcard docs/*.5.md) $(PREFIX)/share/man/man5 install -m 644 $(wildcard docs/*.5.md) $(PREFIX)/share/man/man5
install -D -m 644 ocid.service $(PREFIX)/lib/systemd/system
uninstall: uninstall:
systemctl stop ocid.service
systemctl disable ocid.service
rm -f $(PREFIX)/lib/systemd/system/ocid.service
rm -f ${INSTALLDIR}/{ocid,ocic} rm -f ${INSTALLDIR}/{ocid,ocic}
rm -f $(PREFIX)/libexec/ocid/{conmon,pause} rm -f $(PREFIX)/libexec/ocid/{conmon,pause}
for i in $(wildcard docs/*.8.md); do \ for i in $(wildcard docs/*.8.md); do \

23
ocid.service Normal file
View file

@ -0,0 +1,23 @@
[Unit]
Description=Open Container Initiative Daemon
Documentation=https://github.com/kubernetes-incubator/cri-o
After=network.target
[Service]
Type=notify
EnvironmentFile=-/etc/sysconfig/ocid-storage
EnvironmentFile=-/etc/sysconfig/ocid-network
Environment=GOTRACEBACK=crash
ExecStart=/usr/bin/ocid \
$OCID_STORAGE_OPTIONS \
$OCID_NETWORK_OPTIONS \
ExecReload=/bin/kill -s HUP $MAINPID
TasksMax=8192
LimitNOFILE=1048576
LimitNPROC=1048576
LimitCORE=infinity
TimeoutStartSec=0
Restart=on-abnormal
[Install]
WantedBy=multi-user.target