public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* starting smartd automatically
       [not found] <287027090.6029735.1527517102603.ref@mail.yahoo.com>
@ 2018-05-29  1:04 ` Nuzhna Pomoshch via cygwin
  2018-05-29 11:47   ` Christian Franke
  0 siblings, 1 reply; 3+ messages in thread
From: Nuzhna Pomoshch via cygwin @ 2018-05-29  1:04 UTC (permalink / raw)
  To: cygwin

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).

Thank you (again).

--
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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: starting smartd automatically
  2018-05-29  1:04 ` starting smartd automatically Nuzhna Pomoshch via cygwin
@ 2018-05-29 11:47   ` Christian Franke
  2018-05-29 17:32     ` Christian Franke
  0 siblings, 1 reply; 3+ messages in thread
From: Christian Franke @ 2018-05-29 11:47 UTC (permalink / raw)
  To: cygwin

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: starting smartd automatically
  2018-05-29 11:47   ` Christian Franke
@ 2018-05-29 17:32     ` Christian Franke
  0 siblings, 0 replies; 3+ messages in thread
From: Christian Franke @ 2018-05-29 17:32 UTC (permalink / raw)
  To: cygwin

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-05-29 11:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <287027090.6029735.1527517102603.ref@mail.yahoo.com>
2018-05-29  1:04 ` starting smartd automatically Nuzhna Pomoshch via cygwin
2018-05-29 11:47   ` Christian Franke
2018-05-29 17:32     ` Christian Franke

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).