]> rtime.felk.cvut.cz Git - coffee/buildroot.git/commitdiff
package/nginx: fix error is nginx.service
authorMartin Bark <martin@barkynet.com>
Tue, 3 May 2016 09:36:53 +0000 (10:36 +0100)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Thu, 5 May 2016 20:22:56 +0000 (22:22 +0200)
When using systemd nginx fails to start with the error

    /usr/bin/mkdir: invalid option -- 't'

This is due to a missing space before the semicolon in nginx.service.
For systemd to handle multiple commands in ExecStartPre it requires the
semicolon to be a separate word or the use of multiple ExecStartPre.

This commit splits the multiple commands into two ExecStartPre lines
which fixes the error and improves readability.

Signed-off-by: Martin Bark <martin@barkynet.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/nginx/nginx.service

index 619755fe2e501b036a2f2c132d7d30b0e6741b41..320df9a80e1ca0e5c5529642bf154e3c34cd3d7a 100644 (file)
@@ -5,7 +5,8 @@ After=syslog.target network.target
 [Service]
 Type=forking
 PIDFile=/var/run/nginx.pid
-ExecStartPre=/usr/bin/mkdir -p /var/log/nginx /var/tmp/nginx; /usr/sbin/nginx -t -q -g 'pid /var/run/nginx.pid; daemon on; master_process on;'
+ExecStartPre=/usr/bin/mkdir -p /var/log/nginx /var/tmp/nginx
+ExecStartPre=/usr/sbin/nginx -t -q -g 'pid /var/run/nginx.pid; daemon on; master_process on;'
 ExecStart=/usr/sbin/nginx -g 'pid /var/run/nginx.pid; daemon on; master_process on;'
 ExecReload=/usr/sbin/nginx -g 'pid /var/run/nginx.pid; daemon on; master_process on;' -s reload
 ExecStop=/usr/sbin/nginx -g 'pid /var/run/nginx.pid;' -s quit