summaryrefslogtreecommitdiff
path: root/dev-libs/openct/files/openct.rc
diff options
context:
space:
mode:
Diffstat (limited to 'dev-libs/openct/files/openct.rc')
-rw-r--r--dev-libs/openct/files/openct.rc30
1 files changed, 30 insertions, 0 deletions
diff --git a/dev-libs/openct/files/openct.rc b/dev-libs/openct/files/openct.rc
new file mode 100644
index 00000000000..b6a9a5ea917
--- /dev/null
+++ b/dev-libs/openct/files/openct.rc
@@ -0,0 +1,30 @@
+#!/sbin/runscript
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+depend() {
+ need localmount
+}
+
+checkconfig() {
+ if [ ! -e /etc/openct.conf ] ; then
+ eerror "You need an /etc/openct.conf file to run OpenCT"
+ return 1
+ fi
+ return 0
+}
+
+start() {
+ checkconfig || return 1
+
+ ebegin "Starting OpenCT"
+ /usr/sbin/openct-control init
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping OpenCT"
+ /usr/sbin/openct-control shutdown
+ eend $?
+}