Skip to content

Commit

Permalink
Add ocid.service
Browse files Browse the repository at this point in the history
Signed-off-by: Dan Walsh <dwalsh@redhat.com>
  • Loading branch information
rhatdan committed Oct 13, 2016
1 parent 78438e0 commit 72b192c
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ pause/pause.o
/docs/ocid.8
/docs/ocid.conf.5
vendor/src/github.com/kubernetes-incubator/cri-o
ocid.conf
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,12 @@ install:
install -m 644 $(wildcard docs/*.8.md) $(PREFIX)/share/man/man8
install -d $(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:
systemctl stop ocid.service
systemctl disable ocid.service
rm -f $(PREFIX)/lib/systemd/system/ocid.service
rm -f ${INSTALLDIR}/{ocid,ocic}
rm -f $(PREFIX)/libexec/ocid/{conmon,pause}
for i in $(wildcard docs/*.8.md); do \
Expand Down
23 changes: 23 additions & 0 deletions ocid.service
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 72b192c

Please sign in to comment.