apache: add init sysv script
authorFabrice Fontaine <fontaine.fabrice@gmail.com>
Wed, 20 Jun 2018 21:00:21 +0000 (23:00 +0200)
committerPeter Korsgaard <peter@korsgaard.com>
Thu, 21 Jun 2018 19:40:58 +0000 (21:40 +0200)
sysv init script is just a wrapper to apachectl

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Tested-by: Carlos Santos <casantos@datacom.com.br>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
package/apache/S50apache [new file with mode: 0644]
package/apache/apache.mk

diff --git a/package/apache/S50apache b/package/apache/S50apache
new file mode 100644 (file)
index 0000000..623a7ee
--- /dev/null
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+case "$1" in
+  start|restart|graceful|graceful-stop|stop)
+       apachectl -k $1
+       ;;
+  *)
+       echo "Usage: $0 {start|restart|graceful|graceful-stop|stop}"
+       exit 1
+esac
+
+exit $?
index 23414fe44d465ef12944df0dff3ce6b11adc5e73..f4c522916e9be29d37fb2abc42d6e74f289d27be 100644 (file)
@@ -92,4 +92,9 @@ define APACHE_CLEANUP_TARGET
 endef
 APACHE_POST_INSTALL_TARGET_HOOKS += APACHE_CLEANUP_TARGET
 
+define APACHE_INSTALL_INIT_SYSV
+       $(INSTALL) -D -m 0755 package/apache/S50apache \
+               $(TARGET_DIR)/etc/init.d/S50apache
+endef
+
 $(eval $(autotools-package))