Gentoo Archives: gentoo-commits

From: "Manuel Rüger" <mrueg@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] dev/mrueg:master commit in: app-misc/ckb/files/, app-misc/ckb/
Date: Thu, 25 Jun 2015 14:00:42
Message-Id: 1435240789.5a4fdbf3911a8205b1289088e5ad524b83686ce9.mrueg@gentoo
1 commit: 5a4fdbf3911a8205b1289088e5ad524b83686ce9
2 Author: Manuel Rüger <mrueg <AT> gentoo <DOT> org>
3 AuthorDate: Thu Jun 25 13:59:49 2015 +0000
4 Commit: Manuel Rüger <mrueg <AT> gentoo <DOT> org>
5 CommitDate: Thu Jun 25 13:59:49 2015 +0000
6 URL: https://gitweb.gentoo.org/dev/mrueg.git/commit/?id=5a4fdbf3
7
8 [app-misc/ckb] Add init file.
9
10 Package-Manager: portage-2.2.20
11
12 app-misc/ckb/ckb-0.1.5.ebuild | 1 +
13 app-misc/ckb/files/ckb.initd | 28 ++++++++++++++++++++++++++++
14 2 files changed, 29 insertions(+)
15
16 diff --git a/app-misc/ckb/ckb-0.1.5.ebuild b/app-misc/ckb/ckb-0.1.5.ebuild
17 index 7f17e20..840e213 100644
18 --- a/app-misc/ckb/ckb-0.1.5.ebuild
19 +++ b/app-misc/ckb/ckb-0.1.5.ebuild
20 @@ -39,6 +39,7 @@ src_install() {
21 exeinto /usr/bin/ckb-animations
22 doexe bin/ckb-animations/*
23
24 + doinitd "${FILESDIR}"/ckb.initd
25 domenu usr/ckb.desktop
26 doicon usr/ckb.png
27 systemd_dounit service/systemd/ckb-daemon.service
28
29 diff --git a/app-misc/ckb/files/ckb.initd b/app-misc/ckb/files/ckb.initd
30 new file mode 100755
31 index 0000000..1051b7f
32 --- /dev/null
33 +++ b/app-misc/ckb/files/ckb.initd
34 @@ -0,0 +1,28 @@
35 +#!/sbin/runscript
36 +## Copyright 1999-2015 Gentoo Foundation
37 +# Distributed under the terms of the GNU General Public License v2
38 +
39 +extra_started_commands="reload"
40 +command="/usr/bin/ckb-daemon"
41 +description="Controller for Corsair Keyboard Driver"
42 +pidfile="/var/run/ckb.pid"
43 +
44 +start() {
45 + checkconfig || return 1
46 + ebegin "Starting Corsair Keyboard Driver"
47 + start-stop-daemon --start --exec "${command}" --pidfile "${pidfile}"
48 + eend $?
49 +}
50 +
51 +stop() {
52 + ebegin "Stopping Corsair Keyboard Driver"
53 + start-stop-daemon --stop --exec "${command}" --pidfile "${pidfile}"
54 + eend $?
55 +
56 +}
57 +
58 +reload() {
59 + stop
60 + sleep 3
61 + start
62 +}