diff options
Diffstat (limited to 'dev-libs/openct/files/openct.initd')
-rw-r--r-- | dev-libs/openct/files/openct.initd | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/dev-libs/openct/files/openct.initd b/dev-libs/openct/files/openct.initd new file mode 100644 index 000000000000..ecf574f2e31c --- /dev/null +++ b/dev-libs/openct/files/openct.initd @@ -0,0 +1,27 @@ +#!/sbin/openrc-run +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +depend() { + need localmount +} + +start_pre() { + if [ ! -e /etc/openct.conf ] ; then + eerror "You need an /etc/openct.conf file to run OpenCT" + return 1 + fi + checkpath -d -m 0750 -o openctd:openct /var/run/openct +} + +start() { + ebegin "Starting OpenCT" + /usr/sbin/openct-control init + eend $? +} + +stop() { + ebegin "Stopping OpenCT" + /usr/sbin/openct-control shutdown + eend $? +} |