From patchwork Mon Dec 15 22:56:27 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gustavo Zacarias X-Patchwork-Id: 421705 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from hemlock.osuosl.org (hemlock.osuosl.org [140.211.166.133]) by ozlabs.org (Postfix) with ESMTP id E3CAE140082 for ; Tue, 16 Dec 2014 09:56:54 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 109078AA2A; Mon, 15 Dec 2014 22:56:54 +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 x+DZd+eAwKoJ; Mon, 15 Dec 2014 22:56:52 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 1E7C1889C1; Mon, 15 Dec 2014 22:56:52 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id E56D91BFA89 for ; Mon, 15 Dec 2014 22:56:50 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id E246988373 for ; Mon, 15 Dec 2014 22:56:50 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 1SJik-oR0M6e for ; Mon, 15 Dec 2014 22:56:50 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from www.zacarias.com.ar (www.zacarias.com.ar [62.210.192.172]) by whitealder.osuosl.org (Postfix) with ESMTPS id 34E9B8835E for ; Mon, 15 Dec 2014 22:56:50 +0000 (UTC) Received: from asgard (cpe-181-46-99-160.telecentro-reversos.com.ar [181.46.99.160] (may be forged)) (authenticated bits=0) by www.zacarias.com.ar (8.14.9/8.14.9) with ESMTP id sBFMuiHJ010653 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 15 Dec 2014 22:56:46 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=zacarias.com.ar; s=dkey; t=1418684208; bh=ZE/c72i5PjIAazRoG/AKMbNqrscHu8iQaBoumN5a2CA=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=PzWhWC/MzbXKxTt43j07nD9qd2OZ3pmWt+keia2cSXQZBVFIFudwLmVXPDg9WRnDc TXh+RbwdowL6ivopbfyz5mKePXGPEm0IFLuHRtSpeMmYeDD30r4wMRvADGaRIRJlo+ VVShKCb0O+zCpEM1bj4jtLnPnYTk1xgtlAmppDKg= Received: by asgard (sSMTP sendmail emulation); Mon, 15 Dec 2014 19:56:38 -0300 From: Gustavo Zacarias To: buildroot@busybox.net Date: Mon, 15 Dec 2014 19:56:27 -0300 Message-Id: <1418684187-12402-2-git-send-email-gustavo@zacarias.com.ar> X-Mailer: git-send-email 2.0.4 In-Reply-To: <1418684187-12402-1-git-send-email-gustavo@zacarias.com.ar> References: <1418684187-12402-1-git-send-email-gustavo@zacarias.com.ar> X-Virus-Scanned: clamav-milter 0.98.5 at www X-Virus-Status: Clean Subject: [Buildroot] [PATCH 2/2] stunnel: adjust initscript 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: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Use proper status messages, make spacing standard instead of a mix of spacing/tabbing, drop boringly obvious comment from the header. Signed-off-by: Gustavo Zacarias --- package/stunnel/S50stunnel | 37 ++++++++++++++++++------------------- 1 file changed, 18 insertions(+), 19 deletions(-) diff --git a/package/stunnel/S50stunnel b/package/stunnel/S50stunnel index 95bb301..5827fe0 100644 --- a/package/stunnel/S50stunnel +++ b/package/stunnel/S50stunnel @@ -1,36 +1,35 @@ #!/bin/sh -# -# Starts stunnel -# start() { - echo -n "Starting stunnel: " - start-stop-daemon -S -q -p /var/run/stunnel.pid --exec /usr/bin/stunnel - echo "OK" + echo -n "Starting stunnel: " + start-stop-daemon -S -q -p /var/run/stunnel.pid --exec /usr/bin/stunnel + [ $? = 0 ] && echo "OK" || echo "FAIL" } + stop() { - echo -n "Stopping stunnel: " - start-stop-daemon -K -q -p /var/run/stunnel.pid - echo "OK" + echo -n "Stopping stunnel: " + start-stop-daemon -K -q -p /var/run/stunnel.pid + [ $? = 0 ] && echo "OK" || echo "FAIL" } + restart() { - stop - start + stop + start } case "$1" in start) - start - ;; + start + ;; stop) - stop - ;; + stop + ;; restart|reload) - restart - ;; + restart + ;; *) - echo "Usage: $0 {start|stop|restart}" - exit 1 + echo "Usage: $0 {start|stop|restart}" + exit 1 esac exit $?