Add readme file 'README.create-run-dir'.

This commit is contained in:
Christoph 2023-03-12 18:12:56 +01:00
parent 4530f68ccf
commit 7b47f3ca12

19
DOC/README.create-run-dir Normal file
View File

@ -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