I created a service that would make the dir at start:
vim /etc/systemd/system/mydaemon-helper.service
The contents of /etc/systemd/system/mydaemon-helper.service:
[Unit]
Description=MyDaemon Helper Simple Service
After=network.target
[Service]
Type=simple
ExecStartPre=-/usr/bin/mkdir /var/run/mydaemon
ExecStart=/usr/bin/chown myuser:myuser /var/run/mydaemon
Restart=on-abort
[Install]
WantedBy=multi-user.target
Then I started this service:
systemctl start mydaemon-helper
systemctl status mydaemon-helper
Output:
[root@alpha etc]# systemctl status mydaemon-helper.service
● mydaemon-helper.service - MyDaemon Helper Simple Service
Loaded: loaded (/etc/systemd/system/mydaemon-helper.service; disabled; vendor preset: disabled)
Active: inactive (dead)
May 28 20:53:50 alpha systemd[1]: Starting MyDaemon Helper Simple Service...
May 28 20:53:50 alpha systemd[1]: Started MyDaemon Helper Simple Service.
Lastly I told the system to load it on startup:
systemctl enable mydaemon-helper
systemd-sysv-generatorand I've had enough learning curves for the week. Just that one .conf file and that one line. Feelin good right now B-) – user24601 May 30 '16 at 03:17/usr/lib/tmpfiles.d/php7.3-fpm.confand/usr/lib/tmpfiles.d/php7.2-fpm.confand it still doesn't create the/run/phpdirectory. – MarthyM Jul 22 '19 at 05:00