mirror of
https://github.com/gentoo-mirror/guru.git
synced 2026-07-19 03:53:22 -04:00
app-admin/ananicy: add openrc initd
Signed-off-by: Alessandro Barbieri <lssndrbarbieri@gmail.com>
This commit is contained in:
36
app-admin/ananicy/ananicy-2.2.1-r1.ebuild
Normal file
36
app-admin/ananicy/ananicy-2.2.1-r1.ebuild
Normal file
@@ -0,0 +1,36 @@
|
||||
# Copyright 1999-2021 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI="7"
|
||||
|
||||
PYTHON_COMPAT=( python3_{7,8,9} pypy3 )
|
||||
|
||||
inherit python-single-r1
|
||||
|
||||
DESCRIPTION="ANother Auto NICe daemon"
|
||||
HOMEPAGE="https://github.com/Nefelim4ag/Ananicy"
|
||||
SRC_URI="https://github.com/Nefelim4ag/Ananicy/archive/${PV}.tar.gz -> ${P}.tar.gz"
|
||||
S="${WORKDIR}/${P^}"
|
||||
LICENSE="GPL-3"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64"
|
||||
|
||||
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
|
||||
DEPEND="${PYTHON_DEPS}"
|
||||
RDEPEND="
|
||||
${DEPEND}
|
||||
sys-process/schedtool
|
||||
"
|
||||
DOCS=( README.md )
|
||||
PATCHES=( "${FILESDIR}/fix-sysctl-path.patch" )
|
||||
|
||||
src_compile() {
|
||||
return
|
||||
}
|
||||
|
||||
src_install() {
|
||||
emake PREFIX="${D}" install
|
||||
python_fix_shebang "${ED}/usr/bin/ananicy"
|
||||
doinitd ananicy.initd
|
||||
einstalldocs
|
||||
}
|
||||
18
app-admin/ananicy/files/ananicy.initd
Normal file
18
app-admin/ananicy/files/ananicy.initd
Normal file
@@ -0,0 +1,18 @@
|
||||
#!/usr/bin/openrc-run
|
||||
|
||||
pidfile="/run/ananicy.pid"
|
||||
command="/usr/bin/ananicy"
|
||||
command_args="start"
|
||||
command_background=true
|
||||
|
||||
start_pre() {
|
||||
/sbin/sysctl -e kernel.sched_autogroup_enabled=0
|
||||
}
|
||||
|
||||
stop_post() {
|
||||
/sbin/sysctl -e kernel.sched_autogroup_enabled=1
|
||||
}
|
||||
|
||||
stop() {
|
||||
start-stop-daemon --stop --pidfile "$pidfile"
|
||||
}
|
||||
Reference in New Issue
Block a user