commit:     5a4fdbf3911a8205b1289088e5ad524b83686ce9
Author:     Manuel Rüger <mrueg <AT> gentoo <DOT> org>
AuthorDate: Thu Jun 25 13:59:49 2015 +0000
Commit:     Manuel Rüger <mrueg <AT> gentoo <DOT> org>
CommitDate: Thu Jun 25 13:59:49 2015 +0000
URL:        https://gitweb.gentoo.org/dev/mrueg.git/commit/?id=5a4fdbf3

[app-misc/ckb] Add init file.

Package-Manager: portage-2.2.20

 app-misc/ckb/ckb-0.1.5.ebuild |  1 +
 app-misc/ckb/files/ckb.initd  | 28 ++++++++++++++++++++++++++++
 2 files changed, 29 insertions(+)

diff --git a/app-misc/ckb/ckb-0.1.5.ebuild b/app-misc/ckb/ckb-0.1.5.ebuild
index 7f17e20..840e213 100644
--- a/app-misc/ckb/ckb-0.1.5.ebuild
+++ b/app-misc/ckb/ckb-0.1.5.ebuild
@@ -39,6 +39,7 @@ src_install() {
        exeinto /usr/bin/ckb-animations
        doexe bin/ckb-animations/*
 
+       doinitd "${FILESDIR}"/ckb.initd
        domenu usr/ckb.desktop
        doicon usr/ckb.png
        systemd_dounit service/systemd/ckb-daemon.service

diff --git a/app-misc/ckb/files/ckb.initd b/app-misc/ckb/files/ckb.initd
new file mode 100755
index 0000000..1051b7f
--- /dev/null
+++ b/app-misc/ckb/files/ckb.initd
@@ -0,0 +1,28 @@
+#!/sbin/runscript
+## Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+extra_started_commands="reload"
+command="/usr/bin/ckb-daemon"
+description="Controller for Corsair Keyboard Driver"
+pidfile="/var/run/ckb.pid"
+
+start() {
+       checkconfig || return 1
+       ebegin "Starting Corsair Keyboard Driver"
+       start-stop-daemon --start --exec "${command}" --pidfile "${pidfile}"
+       eend $?
+}
+
+stop() {
+       ebegin "Stopping Corsair Keyboard Driver"
+       start-stop-daemon --stop --exec "${command}" --pidfile "${pidfile}"
+       eend $?
+
+}
+
+reload() {
+       stop
+       sleep 3
+       start
+}

Reply via email to