nginx: activate the systemd service
authorAurélien Chabot <aurelien@chabot.fr>
Mon, 13 Jul 2015 18:53:10 +0000 (20:53 +0200)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Mon, 13 Jul 2015 20:28:09 +0000 (22:28 +0200)
Signed-off-by: Aurélien Chabot <aurelien@chabot.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/nginx/nginx.mk

index c617f680ee8e66e9377c930d6b2eb379bec0a0db..32a337c2de6006a4f3fc0cc62bf24c398642d43f 100644 (file)
@@ -230,6 +230,11 @@ endef
 define NGINX_INSTALL_INIT_SYSTEMD
        $(INSTALL) -D -m 0644 package/nginx/nginx.service \
                $(TARGET_DIR)/usr/lib/systemd/system/nginx.service
+
+       mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
+
+       ln -fs ../../../../usr/lib/systemd/system/nginx.service \
+               $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/nginx.service
 endef
 
 define NGINX_INSTALL_INIT_SYSV