diff mbox series

package/mender: fix sysv startup script

Message ID 20190215214410.29132-1-angelo@amarulasolutions.com
State Accepted
Headers show
Series package/mender: fix sysv startup script | expand

Commit Message

Angelo Compagnucci Feb. 15, 2019, 9:44 p.m. UTC
Mender is a service explicitly written for systemd and so it doesn't
fork on background, doesn't redirect outputs and doesn't create a pid
file by itself.
To make the service running correctly is therefore necessary to use the
-m switch of start-stop-daemon to create the pid file and -b option to
send the process to background.
Logging is preserved because the service will log anyway on syslog.

Signed-off-by: Angelo Compagnucci <angelo@amarulasolutions.com>
---
 package/mender/S42mender | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Thomas Petazzoni Feb. 15, 2019, 10 p.m. UTC | #1
On Fri, 15 Feb 2019 22:44:10 +0100
Angelo Compagnucci <angelo.compagnucci@gmail.com> wrote:

> Mender is a service explicitly written for systemd and so it doesn't
> fork on background, doesn't redirect outputs and doesn't create a pid
> file by itself.
> To make the service running correctly is therefore necessary to use the
> -m switch of start-stop-daemon to create the pid file and -b option to
> send the process to background.
> Logging is preserved because the service will log anyway on syslog.
> 
> Signed-off-by: Angelo Compagnucci <angelo@amarulasolutions.com>
> ---
>  package/mender/S42mender | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Applied to master, thanks.

Thomas
diff mbox series

Patch

diff --git a/package/mender/S42mender b/package/mender/S42mender
index 665a9dd74a..108fecfea9 100644
--- a/package/mender/S42mender
+++ b/package/mender/S42mender
@@ -24,7 +24,7 @@  start() {
 	printf "Starting mender service: "
 	umask 077
 
-	start-stop-daemon -S -q -p /var/run/mender.pid \
+	start-stop-daemon -S -q -b -m -p /var/run/mender.pid \
 		--exec /usr/bin/mender -- -daemon
 	[ $? = 0 ] && echo "OK" || echo "FAIL"
 }