mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-11-20 10:17:08 -08:00
There is a new pam module added. Had to patch the automagic deps for it Package-Manager: portage-2.2.20.1
38 lines
801 B
Plaintext
38 lines
801 B
Plaintext
#!/sbin/openrc-run
|
|
# Copyright 1999-2015 Gentoo Foundation
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
# $Id$
|
|
|
|
DAEMON=/usr/sbin/cgproxy
|
|
PIDFILE=/run/cgproxy.pid
|
|
NESTED=yes
|
|
OPTIONS=
|
|
|
|
depend() {
|
|
after cgmanager
|
|
}
|
|
|
|
start() {
|
|
ebegin "Starting cgproxy server"
|
|
if ! /usr/sbin/cgproxy --check-master; then
|
|
ewarn "cgmanager is not running"
|
|
return 1
|
|
fi
|
|
# cgproxy should only run on container unless on older kernel
|
|
if [ -e /proc/self/ns/pid ] && [ "$NESTED" != "yes" ]; then
|
|
eerror "Too old kernel to support cgroup, please update to >3.8"
|
|
return 1
|
|
fi
|
|
|
|
start-stop-daemon --start --pidfile ${PIDFILE} --exec ${DAEMON} \
|
|
-- --daemon ${OPTIONS}
|
|
|
|
eend $?
|
|
}
|
|
|
|
stop() {
|
|
ebegin "Stopping cgproxy server"
|
|
start-stop-daemon --stop --quiet -R TERM/45 -p ${PIDFILE}
|
|
eend $?
|
|
}
|