From 7b47f3ca12236e4463b9b865a843ed7f20d2c80b Mon Sep 17 00:00:00 2001 From: Christoph Date: Sun, 12 Mar 2023 18:12:56 +0100 Subject: [PATCH] Add readme file 'README.create-run-dir'. --- DOC/README.create-run-dir | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 DOC/README.create-run-dir diff --git a/DOC/README.create-run-dir b/DOC/README.create-run-dir new file mode 100644 index 0000000..ab472a0 --- /dev/null +++ b/DOC/README.create-run-dir @@ -0,0 +1,19 @@ +# Create a directory under /run at boot +# +# see: +# https://serverfault.com/questions/779634/create-a-directory-under-var-run-at-boot +# https://www.freedesktop.org/software/systemd/man/tmpfiles.d.html + +PHP_USER=www-data +PHP_GROUP=www-data + +mkdir /run/php +chown ${PHP_USER}:${PHP_GROUP} /run/php + + +# Create at boot time +# +cat << EOF >> /etc/tmpfiles.d/php-fpm.conf +#Type Path Mode UID GID Age Argument +d /run/mydaemon 0755 $PHP_USER $PHP_GROUP - - +EOF