Skip to content

Instantly share code, notes, and snippets.

@bocajspear1
Created May 22, 2016 18:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bocajspear1/cf36b33a3eb88b6b21589eba7fcc9a13 to your computer and use it in GitHub Desktop.
Save bocajspear1/cf36b33a3eb88b6b21589eba7fcc9a13 to your computer and use it in GitHub Desktop.
OpenRC init script for LXCFS
#!/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