X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:subject:to:references:from:message-id:date :mime-version:in-reply-to:content-type :content-transfer-encoding; q=dns; s=default; b=r4Cuf+uTb/Bq3YE4 jw+g8k3TCZvYVXAj97uJNt4Pb0I0kQMW+IcR+QJEJHCB/IQXqxAd56iOeizwbraD y97m+C9e//yG7RCV8m9xjgRYIFYifw7bIIz4JpvfDUefGXymfos10k6qWV6KuHAv 2ZehOVvJiGytX7ap+Xqs6pQy1LE= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:subject:to:references:from:message-id:date :mime-version:in-reply-to:content-type :content-transfer-encoding; s=default; bh=Yjod34nkCHAq4aF7HMlswt SzdKM=; b=iLwyW2/1QFpP3g8a3dkrx35bcdyHKTg3bEMMweg2Wc4/mrUfpSW2k7 M+alID+FTK2OmlXiFpQmauou+SHtvmy1i2Cf5cmRaeHNWuH9c8bovEsP98ZT6kDf uKPjcysfRK2SxKgsGlLGfe2jVyCb9hrjtJ7qU5kJ0RyysLLcQIg0k= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com 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 Subject: Re: starting smartd automatically To: cygwin AT cygwin DOT com References: <287027090 DOT 6029735 DOT 1527517102603 DOT ref AT mail DOT yahoo DOT com> <287027090 DOT 6029735 DOT 1527517102603 AT mail DOT yahoo DOT com> From: Christian Franke Message-ID: Date: Tue, 29 May 2018 13:47:27 +0200 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 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