thttpd: use the <pkg>_INSTALL_INIT_SYSV mechanism
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Sun, 30 Nov 2014 14:17:53 +0000 (15:17 +0100)
committerPeter Korsgaard <peter@korsgaard.com>
Mon, 1 Dec 2014 21:36:57 +0000 (22:36 +0100)
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
package/thttpd/thttpd.mk

index 70a90fdbb242090b6a0e3c5907575672da61ad75..1a028c87379441005119507c5648982adbc04151 100644 (file)
@@ -31,8 +31,6 @@ define THTTPD_INSTALL_TARGET_CMDS
        $(INSTALL) -D -m 0755 $(@D)/scripts/thttpd_wrapper $(TARGET_DIR)/usr/sbin/thttpd_wrapper
        $(SED) 's:/usr/local/sbin:/usr/sbin:g' -e \
                's:/usr/local/www:/var/www:g' $(TARGET_DIR)/usr/sbin/thttpd_wrapper
-       $(INSTALL) -D -m 0755 $(@D)/scripts/thttpd.sh $(TARGET_DIR)/etc/init.d/S90thttpd
-       $(SED) 's:/usr/local/sbin:/usr/sbin:g' $(TARGET_DIR)/etc/init.d/S90thttpd
        $(INSTALL) -d $(TARGET_DIR)/var/www/data
        $(INSTALL) -d $(TARGET_DIR)/var/www/logs
        echo "dir=/var/www/data" > $(TARGET_DIR)/var/www/thttpd_config
@@ -41,4 +39,9 @@ define THTTPD_INSTALL_TARGET_CMDS
        echo "pidfile=/var/run/thttpd.pid" >> $(TARGET_DIR)/var/www/thttpd_config
 endef
 
+define THTTPD_INSTALL_INIT_SYSV
+       $(INSTALL) -D -m 0755 $(@D)/scripts/thttpd.sh $(TARGET_DIR)/etc/init.d/S90thttpd
+       $(SED) 's:/usr/local/sbin:/usr/sbin:g' $(TARGET_DIR)/etc/init.d/S90thttpd
+endef
+
 $(eval $(autotools-package))