summaryrefslogtreecommitdiff
path: root/x11-drivers/nvidia-drivers/files/nvidia-persistenced.initd
diff options
context:
space:
mode:
Diffstat (limited to 'x11-drivers/nvidia-drivers/files/nvidia-persistenced.initd')
-rw-r--r--x11-drivers/nvidia-drivers/files/nvidia-persistenced.initd11
1 files changed, 11 insertions, 0 deletions
diff --git a/x11-drivers/nvidia-drivers/files/nvidia-persistenced.initd b/x11-drivers/nvidia-drivers/files/nvidia-persistenced.initd
new file mode 100644
index 00000000..27d8bb37
--- /dev/null
+++ b/x11-drivers/nvidia-drivers/files/nvidia-persistenced.initd
@@ -0,0 +1,11 @@
+#!/sbin/openrc-run
+# SPDX-License-Identifier: MIT
+
+description="Maintain persistent software state in the NVIDIA driver"
+command="nvidia-persistenced"
+command_args="${NVPD_USER:+--user ${NVPD_USER}} ${ARGS}"
+pidfile="/var/run/nvidia-persistenced/nvidia-persistenced.pid"
+
+stop_post() {
+ rmdir "${pidfile%/*}" 2>/dev/null || true
+}