You are not logged in.
Pages: 1
Hello, i have /var/log dir on ramdisk, so every time system boots it is emtied, its fine, but nginx do not like it:
Starting A high performance web server and a reverse proxy server...
nginx: [alert] could not open error log file: open() "/var/log/nginx/err...ctory)
2013/02/14 09:50:04 [emerg] 1373#0: open() "/var/log/nginx/access.log" f...ctory)
nginx.service: control process exited, code=exited status=1Then i decided to edit startup file /usr/lib/systemd/system/nginx.service and add extra ExecStartPre line:
ExecStartPre=mkdir /var/log/nginx
...But this resulted no effect: the error still there, so systemd man page claim that ExecStart can contain few commands delimited with ";", then i replaced this:
ExecStart=/usr/sbin/nginx -g 'pid /run/nginx.pid; daemon on; master_process on;'with this:
ExecStart=mkdir /var/log/nginx; /usr/sbin/nginx -g 'pid /run/nginx.pid; daemon on; master_process on;'and sadly still no positive effect, directory not created. When i create it by hand, then nginx starts fine.
Any idea what i'm doing wrong ?
Offline
Why make /var/log a ramdisk? Wouldn't that be (very) counter-productive if/when you actually need such logs after a crash?
Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.
Offline
Aside from ngoonee's point, you're best off using temp files - https://wiki.archlinux.org/index.php/Sy … rary_files
See also "man tmpfiles.d"
"...one cannot be angry when one looks at a penguin." - John Ruskin
"Life in general is a bit shit, and so too is the internet. And that's all there is." - scepticisle
Offline
Aside from ngoonee's point, you're best off using temp files - https://wiki.archlinux.org/index.php/Sy … rary_files
See also "man tmpfiles.d"
Thanks a lot, tmpfiles.d solved my problem.
Offline
Please mark the thread [Solved]
I laugh, yet the joke is on me
Offline
Pages: 1