From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 111001 invoked by alias); 29 May 2018 11:47:39 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 110979 invoked by uid 89); 29 May 2018 11:47:37 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.9 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_NONE autolearn=no version=3.3.2 spammy=crude, H*r:sk:mailout, H*r:encrypted, services X-HELO: mailout11.t-online.de Received: from mailout11.t-online.de (HELO mailout11.t-online.de) (194.25.134.85) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 29 May 2018 11:47:35 +0000 Received: from fwd04.aul.t-online.de (fwd04.aul.t-online.de [172.20.26.149]) by mailout11.t-online.de (Postfix) with SMTP id B2CF34246BB8 for ; Tue, 29 May 2018 13:47:32 +0200 (CEST) Received: from [127.0.0.1] (ZByTrrZFrh7thOOn0a5yu+nULw29Wu9YYONO8TQE5dZekuizrFU0BZrFEkPv4ixgVs@[212.117.81.238]) by fwd04.t-online.de with (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384 encrypted) esmtp id 1fNd67-3G4TGi0; Tue, 29 May 2018 13:47:27 +0200 Subject: Re: starting smartd automatically To: cygwin@cygwin.com References: <287027090.6029735.1527517102603.ref@mail.yahoo.com> <287027090.6029735.1527517102603@mail.yahoo.com> From: Christian Franke Message-ID: Date: Tue, 29 May 2018 17:32:00 -0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:54.0) Gecko/20100101 Firefox/54.0 SeaMonkey/2.51 MIME-Version: 1.0 In-Reply-To: <287027090.6029735.1527517102603@mail.yahoo.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2018-05/txt/msg00316.txt.bz2 Message-ID: <20180529173200.BH7pdUrcl8FUFo6zA2wv1nyaMUQ65QaZFLiFPd2dLEA@z> Nuzhna Pomoshch wrote: > I have (in my very limited time with cygwin) noticed that > some daemons (sshd, syslog-ng) are run as Windows > services, and started at boot. > > I have installed smartmontools, and see that it has a more > traditional (linux) installation. The smartd start script is in > /etc/rc.d/init.d/. > > I am wondering if there is some way to start this as soon > as the machine is booted (even before logging in). The /etc/rc.d/init.d/smartd script could also be used to install and run smartd as a Windows service (see also NOTES on smartd man page). Example: $ /etc/rc.d/init.d/smartd status Checking smartd status: not running. $ /etc/rc.d/init.d/smartd install Installing service smartd (depending on 'syslog-ng'): done $ /etc/rc.d/init.d/smartd status Checking smartd status: installed as service 'smartd' but not running. $ /etc/rc.d/init.d/smartd start Starting service smartd: done $ /etc/rc.d/init.d/smartd status Checking smartd status: running as service 'smartd'. $ /etc/rc.d/init.d/smartd stop Shutting down smartd: done $ /etc/rc.d/init.d/smartd status Checking smartd status: installed as service 'smartd' but not running. $ /etc/rc.d/init.d/smartd remove Removing service smartd: done $ /etc/rc.d/init.d/smartd status Checking smartd status: not running. I would also recommend to change the service start type to "delayed". Setting this is not yet supported by "cygrunsrv". It could be later set in service GUI or with Windows CLI tool "sc". Example: $ sc qc smartd ... START_TYPE : 2 AUTO_START ... $ sc config smartd start= delayed-auto ... $ sc qc smartd ... START_TYPE : 2 AUTO_START (DELAYED) ... Note the crude syntax: The space after "start=" is required. Hope this helps, Christian -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple