path: root/package
diff options
authorGravatar Angelo Compagnucci <angelo.compagnucci@gmail.com>2019-02-15 22:44:10 +0100
committerGravatar Thomas Petazzoni <thomas.petazzoni@bootlin.com>2019-02-15 23:00:12 +0100
commit63739c5c25805816a20e7073e837e18854e83ada (patch)
tree02ecbd68a9aceb3478f2023a138e628b76b1a270 /package
parentdd97b055b11b8708438974555d1746a18924ceba (diff)
package/mender: fix sysv startup script
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> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Diffstat (limited to 'package')
1 files changed, 1 insertions, 1 deletions
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"