Bug 11566 - Fix init script
Summary: Fix init script
Status: RESOLVED FIXED
Alias: None
Product: buildroot
Classification: Unclassified
Component: Other (show other bugs)
Version: unspecified
Hardware: All Linux
: P5 minor
Target Milestone: ---
Assignee: Carlos Santos
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-12-18 17:56 UTC by Bin Zhang
Modified: 2018-12-21 16:08 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Bin Zhang 2018-12-18 17:56:26 UTC
Hello,

The init script restart and stop don't work. 

Thanks,
Bin Zhang 

--- S99shairport-sync.orig      2018-12-18 18:46:22.096225172 +0100
+++ S99shairport-sync   2018-12-18 18:47:30.360227688 +0100
@@ -6,16 +6,17 @@
 case "$1" in
     start)
        printf "Starting shairport-sync: "
-       start-stop-daemon -S -q -p /var/run/shairport-sync.pid --exec /usr/bin/shairport-sync -- $OPTIONS
+       start-stop-daemon -S -q --exec /usr/bin/shairport-sync -- $OPTIONS
        [ $? = 0 ] && echo "OK" || echo "FAIL"
        ;;
     stop)
        printf "Stopping shairport-sync: "
-       start-stop-daemon -K -q -p /var/run/shairport-sync.pid
+       start-stop-daemon -K -q -p /var/run/shairport-sync/shairport-sync.pid
        [ $? = 0 ] && echo "OK" || echo "FAIL"
        ;;
     restart)
        $0 stop
+       sleep 1
        $0 start
        ;;
     *)
Comment 1 Carlos Santos 2018-12-20 22:12:21 UTC
(In reply to Bin Zhang from comment #0)

Thanks for reporting this bug. A patch to fix it has been submitted:

    https://patchwork.ozlabs.org/patch/1017084/
Comment 2 Carlos Santos 2018-12-20 22:19:36 UTC
Patch updated: https://patchwork.ozlabs.org/patch/1017087/
Comment 3 Carlos Santos 2018-12-21 16:08:45 UTC
Please check if this bug is solved after commit 6568b939293e46718434e284bded04b746fbd80f in the master branch and change the status to VERIFIED.