Created
May 22, 2016 18:08
-
-
Save bocajspear1/cf36b33a3eb88b6b21589eba7fcc9a13 to your computer and use it in GitHub Desktop.
OpenRC init script for LXCFS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/sbin/openrc-run | |
# Copyright 1999-2015 Gentoo Foundation | |
# Distributed under the terms of the GNU General Public License v2 | |
# $Id$ | |
name="lxcfs" | |
depend() { | |
after cgmanager | |
} | |
start() { | |
ebegin "Starting lxcfs" | |
start-stop-daemon --start --exec /usr/bin/lxcfs --name lxcfs \ | |
--background --pidfile /var/run/lxcfs.pid --make-pidfile -- -s -f -o allow_other /usr/var/lib/lxcfs | |
chmod -R 700 /run/lxcfs/controllers | |
chown -R 100000:100000 /run/lxcfs | |
eend $? | |
} | |
stop() { | |
ebegin "Stopping lxcfs" | |
start-stop-daemon --stop --exec /usr/bin/lxcfs --pidfile /var/run/lxcfs.pid --signal KILL | |
umount /run/lxcfs/controllers/* | |
umount /run/lxcfs/controllers | |
umount /usr/var/lib/lxcfs | |
eend $? | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment