summaryrefslogtreecommitdiff
path: root/sys-fs/lxcfs/files/lxcfs-5.0.2.initd
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-09-08 10:38:04 +0100
committerV3n3RiX <venerix@koprulu.sector>2022-09-08 10:38:04 +0100
commitc02f0a2cafa1964dc62d8ef9312083b606a9b7c5 (patch)
treed45fcdd0335c79bdb4ce02ec5b5e6c681939881e /sys-fs/lxcfs/files/lxcfs-5.0.2.initd
parent8bba0fff0bc9709d45aeb68336998e11d118ab05 (diff)
gentoo auto-resync : 08:09:2022 - 10:38:04
Diffstat (limited to 'sys-fs/lxcfs/files/lxcfs-5.0.2.initd')
-rw-r--r--sys-fs/lxcfs/files/lxcfs-5.0.2.initd27
1 files changed, 27 insertions, 0 deletions
diff --git a/sys-fs/lxcfs/files/lxcfs-5.0.2.initd b/sys-fs/lxcfs/files/lxcfs-5.0.2.initd
new file mode 100644
index 000000000000..f3119f2e8e82
--- /dev/null
+++ b/sys-fs/lxcfs/files/lxcfs-5.0.2.initd
@@ -0,0 +1,27 @@
+#!/sbin/openrc-run
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+DAEMON=/usr/bin/lxcfs
+PIDFILE=/run/lxcfs.pid
+
+start() {
+ ebegin "Starting lxcfs."
+ /sbin/modprobe -q fuse
+ install -d "${LXCFS_PATH}"
+ start-stop-daemon --start \
+ --pidfile ${PIDFILE} \
+ --exec ${DAEMON} \
+ --background \
+ --make-pidfile \
+ -- ${LXCFS_OPTS} \
+ "${LXCFS_PATH}"
+ eend ${?}
+}
+
+stop() {
+ ebegin "Stopping lxcfs."
+ /usr/bin/fusermount3 -u "${LXCFS_PATH}"
+ start-stop-daemon --stop --quiet -R TERM/45 -p ${PIDFILE}
+ eend ${?}
+}