All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] apache: add init sysv script
@ 2018-06-20 21:00 Fabrice Fontaine
  2018-06-21 18:13 ` Carlos Santos
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Fabrice Fontaine @ 2018-06-20 21:00 UTC (permalink / raw)
  To: buildroot

sysv init script is just a wrapper to apachectl

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 package/apache/S50apache | 12 ++++++++++++
 package/apache/apache.mk |  5 +++++
 2 files changed, 17 insertions(+)
 create mode 100644 package/apache/S50apache

diff --git a/package/apache/S50apache b/package/apache/S50apache
new file mode 100644
index 0000000000..623a7eef3b
--- /dev/null
+++ b/package/apache/S50apache
@@ -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 $?
diff --git a/package/apache/apache.mk b/package/apache/apache.mk
index 23414fe44d..f4c522916e 100644
--- a/package/apache/apache.mk
+++ b/package/apache/apache.mk
@@ -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))
-- 
2.14.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [Buildroot] [PATCH 1/1] apache: add init sysv script
  2018-06-20 21:00 [Buildroot] [PATCH 1/1] apache: add init sysv script Fabrice Fontaine
@ 2018-06-21 18:13 ` Carlos Santos
  2018-06-21 19:41 ` Peter Korsgaard
  2018-06-21 22:18 ` Arnout Vandecappelle
  2 siblings, 0 replies; 4+ messages in thread
From: Carlos Santos @ 2018-06-21 18:13 UTC (permalink / raw)
  To: buildroot

> From: "Fabrice Fontaine" <fontaine.fabrice@gmail.com>
> To: "buildroot" <buildroot@buildroot.org>
> Cc: "Fabrice Fontaine" <fontaine.fabrice@gmail.com>
> Sent: Wednesday, June 20, 2018 6:00:21 PM
> Subject: [Buildroot] [PATCH 1/1] apache: add init sysv script

> sysv init script is just a wrapper to apachectl
> 
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> ---
> package/apache/S50apache | 12 ++++++++++++
> package/apache/apache.mk |  5 +++++
> 2 files changed, 17 insertions(+)
> create mode 100644 package/apache/S50apache
> 
> diff --git a/package/apache/S50apache b/package/apache/S50apache
> new file mode 100644
> index 0000000000..623a7eef3b
> --- /dev/null
> +++ b/package/apache/S50apache
> @@ -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 $?
> diff --git a/package/apache/apache.mk b/package/apache/apache.mk
> index 23414fe44d..f4c522916e 100644
> --- a/package/apache/apache.mk
> +++ b/package/apache/apache.mk
> @@ -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))
> --
> 2.14.1

Tested-by: Carlos Santos <casantos@datacom.com.br>

Built a VM and tested all options. Looks good to me. Do you intend to
add the corresponding systemd service configuration?

-- 
Carlos Santos (Casantos) - DATACOM, P&D
?Marched towards the enemy, spear upright, armed with the certainty
that only the ignorant can have.? ? Epitaph of a volunteer

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Buildroot] [PATCH 1/1] apache: add init sysv script
  2018-06-20 21:00 [Buildroot] [PATCH 1/1] apache: add init sysv script Fabrice Fontaine
  2018-06-21 18:13 ` Carlos Santos
@ 2018-06-21 19:41 ` Peter Korsgaard
  2018-06-21 22:18 ` Arnout Vandecappelle
  2 siblings, 0 replies; 4+ messages in thread
From: Peter Korsgaard @ 2018-06-21 19:41 UTC (permalink / raw)
  To: buildroot

>>>>> "Fabrice" == Fabrice Fontaine <fontaine.fabrice@gmail.com> writes:

 > sysv init script is just a wrapper to apachectl
 > Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>

Committed, thanks.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Buildroot] [PATCH 1/1] apache: add init sysv script
  2018-06-20 21:00 [Buildroot] [PATCH 1/1] apache: add init sysv script Fabrice Fontaine
  2018-06-21 18:13 ` Carlos Santos
  2018-06-21 19:41 ` Peter Korsgaard
@ 2018-06-21 22:18 ` Arnout Vandecappelle
  2 siblings, 0 replies; 4+ messages in thread
From: Arnout Vandecappelle @ 2018-06-21 22:18 UTC (permalink / raw)
  To: buildroot



On 20-06-18 23:00, Fabrice Fontaine wrote:
> sysv init script is just a wrapper to apachectl
> 
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> ---
>  package/apache/S50apache | 12 ++++++++++++
>  package/apache/apache.mk |  5 +++++
>  2 files changed, 17 insertions(+)
>  create mode 100644 package/apache/S50apache
> 
> diff --git a/package/apache/S50apache b/package/apache/S50apache
> new file mode 100644
> index 0000000000..623a7eef3b
> --- /dev/null
> +++ b/package/apache/S50apache
> @@ -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}"

 In our "init script standardisation" effort, I think the idea was to always
support start, stop, restart and reload. Could you add a reload command that
maps onto restart?

 Regards,
 Arnout

> +	exit 1
> +esac
> +
> +exit $?
> diff --git a/package/apache/apache.mk b/package/apache/apache.mk
> index 23414fe44d..f4c522916e 100644
> --- a/package/apache/apache.mk
> +++ b/package/apache/apache.mk
> @@ -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))
> 

-- 
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-06-21 22:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-20 21:00 [Buildroot] [PATCH 1/1] apache: add init sysv script Fabrice Fontaine
2018-06-21 18:13 ` Carlos Santos
2018-06-21 19:41 ` Peter Korsgaard
2018-06-21 22:18 ` Arnout Vandecappelle

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.