apache: add simple init script
authorSebastian Kemper <redacted>
Wed, 1 Jan 2020 22:56:28 +0000 (23:56 +0100)
committerSebastian Kemper <redacted>
Wed, 1 Jan 2020 22:57:27 +0000 (23:57 +0100)
Also preinst and postrm are removed. busybox's httpd isn't installed by
default, so these gimmicks seem antiquated.

Signed-off-by: Sebastian Kemper <redacted>
net/apache/Makefile
net/apache/files/apache.init [new file with mode: 0644]

index 908b7a67cfd83a3d22b659b11c31dbbe3bf88b48..bd8a39623201a7ca284366be9e9298f7382f1d4d 100644 (file)
@@ -105,6 +105,7 @@ define Package/apache/conffiles
 /etc/apache2/extra/proxy-html.conf
 /etc/apache2/magic
 /etc/apache2/mime.types
+/etc/init.d/apache
 endef
 
 define Package/apache-ab
@@ -296,12 +297,6 @@ define Build/InstallDev
                $(1)/usr/share
 endef
 
-define Package/apache/preinst
-       rm /usr/sbin/httpd
-       echo -e "You should take a look in the initscripts, busybox's httpd \n\
-       uses some parameters which are maybe unsupported by apache."
-endef
-
 define Package/apache/install
        $(INSTALL_DIR) $(1)/etc/apache2/extra
        $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/apache2/extra/* \
@@ -330,13 +325,6 @@ define Package/apache/install
                                                        $(1)/usr/sbin
 endef
 
-define Package/apache/postrm
-       rm -rf /usr/sbin/httpd
-       ln -s /bin/busybox /usr/sbin/httpd
-       echo -e "You may need to change your initscripts back for the use \n\
-               with busybox's httpd."
-endef
-
 define Package/apache-ab/install
        $(INSTALL_DIR) $(1)/usr/bin
        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ab $(1)/usr/bin
diff --git a/net/apache/files/apache.init b/net/apache/files/apache.init
new file mode 100644 (file)
index 0000000..a0136c8
--- /dev/null
@@ -0,0 +1,20 @@
+#!/bin/sh /etc/rc.common
+
+START=99
+
+reload() {
+       apachectl -k restart
+}
+
+restart() {
+       apachectl -k restart
+}
+
+start() {
+       mkdir -p /var/log/apache2 /var/run/apache2
+       apachectl -k start
+}
+
+stop() {
+       apachectl -k stop
+}
git clone https://git.99rst.org/PROJECT