From patchwork Fri Aug 21 17:55:18 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Beno=C3=AEt_Th=C3=A9baudeau?= X-Patchwork-Id: 509616 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ozlabs.org (Postfix) with ESMTP id CDC20140773 for ; Sat, 22 Aug 2015 03:55:31 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id E715C95E7F; Fri, 21 Aug 2015 17:55:29 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id YSUiNEt7am3C; Fri, 21 Aug 2015 17:55:28 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 4200B95E53; Fri, 21 Aug 2015 17:55:28 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id 510CA1C21C7 for ; Fri, 21 Aug 2015 17:55:27 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 4CA8DA3F69 for ; Fri, 21 Aug 2015 17:55:27 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 6ULHeSF6k09q for ; Fri, 21 Aug 2015 17:55:26 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from authsmtp.register.it (authsmtp75.register.it [195.110.101.59]) by fraxinus.osuosl.org (Postfix) with ESMTP id E2CECA3E60 for ; Fri, 21 Aug 2015 17:55:25 +0000 (UTC) Received: from localhost.localdomain ([88.172.188.148]) by paganini34 with id 7VvL1r0093CYkgw01VvPFH; Fri, 21 Aug 2015 19:55:24 +0200 X-Rid: benoit@wsystem.com@88.172.188.148 From: =?UTF-8?q?Beno=C3=AEt=20Th=C3=A9baudeau?= To: buildroot@buildroot.org Date: Fri, 21 Aug 2015 19:55:18 +0200 Message-Id: <1440179718-1864-1-git-send-email-benoit@wsystem.com> X-Mailer: git-send-email 2.1.4 MIME-Version: 1.0 Cc: =?UTF-8?q?Beno=C3=AEt=20Th=C3=A9baudeau?= Subject: [Buildroot] [PATCH] package/minidlna/S60minidlnad: add force-reload to rebuild DB X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Add a force-reload operation that restarts minidlnad and makes it rebuild its database. This is what Debian does, and this is useful when media_dir is changed in the configuration file or when inotify can not detect changes inside the media directories (e.g. in case of a mount). Signed-off-by: Benoît Thébaudeau --- package/minidlna/S60minidlnad | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/package/minidlna/S60minidlnad b/package/minidlna/S60minidlnad index f99999a..b4b62ba 100644 --- a/package/minidlna/S60minidlnad +++ b/package/minidlna/S60minidlnad @@ -7,7 +7,7 @@ start() { echo -n "Starting minidlna: " umask 077 start-stop-daemon -S -q -p /var/run/minidlna/minidlna.pid \ - --exec /usr/sbin/minidlnad + --exec /usr/sbin/minidlnad -- "$@" [ $? = 0 ] && echo "OK" || echo "FAIL" } stop() { @@ -19,7 +19,7 @@ restart() { stop # Sleep needed for minidlna to restart properly sleep 1 - start + start "$@" } case "$1" in @@ -32,8 +32,11 @@ case "$1" in restart|reload) restart ;; + force-reload) + restart -R + ;; *) - echo "Usage: $0 {start|stop|restart}" + echo "Usage: $0 {start|stop|restart|force-reload}" exit 1 esac