Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Date: Thu, 14 Feb 2002 17:41:45 -0800 From: ARM Instrument Mentor Subject: RE: Best way to run SSHD, cron, etc, on Win9x? To: cygwin AT cygwin DOT com Message-id: <3C6C6759.3C45D403@arm.gov> MIME-version: 1.0 X-Mailer: Mozilla 4.76 [en] (Win98; U) Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7bit X-Accept-Language: en > I run some Cygwin daemons on Win98 boxes. The way I do it is to put the > following shortcut in the Windows Startup folder: > c:\cygwin\bin\bash.exe --rcfile /usr/local/bin/startup.sh -i > Then in startup.sh, I have: > /usr/sbin/sshd > /usr/bin/rsync --daemon > /usr/sbin/cron ... snip ... > I imagine there must be a better way. Anyone have any suggestions? I've struggled with that too. I'm not sure why, but rxvt seems to help. Try this in a shortcut: "start /m rxvt -e bash /usr/local/bin/startup.sh" It isn't strictly necessary to use bash above. For example, you can also so "start /m rxvt -e c:\cygwin\usr\local\bin\startup.sh" but then you have the unfortunate mixture of unix an Windows slashes. This looks a bit cleaner than the approach you indicated since it eliminates the minimized DOS prompt, but it doesn't get you away from having to manually close the process at shutdown. I found a little utility called "shutdown.exe" (of all things!) that is supposed to force background programs like that to terminate without complaint. It's a nice idea, but it doesn't always work properly. Anyway, you can grab it from here if you want to evaluate it: http://playground.arm.gov/~flynn/pub/library/Softlib/Windows/Non-Comm/SHUTDOWN/. I have some other problems with cron on Win9x. I've read and tried Corinna's suggestions to Craig Rees. I am getting marginal success. CRON starts and will properly execute crontabs stored under /var/cron/tabs if they are named after users found in passwd. So far so good. However, once cron is running, it doesn't seem to detect changes to those crontabs as it is supposed to. At least my understanding through man pages on cron and crontab is that cron is supposed to monitor the cron/tabs spool directory for changes to the modification time. Well, I used crontab to update my user-specific crontab (and it did place the updated file in the /var/cron/tabs directory) but the mod time of the directory didn't change, and maybe that's why cron ignores the update? I always have to kill the cron process and restart it. I tried using touch -m on the /var/cron/tabs directory but it didn't seem to have any effect. Finally, I tried deleting the /var/cron/tabs directory and recreating it while cron was running to see if the new creation time would trigger cron to read it. This actually worked. So this leads me to wonder if crontabs is not doing its job correctly? Maybe it isn't successfully touching the mod time of the cron/tabs directory? In fact, short of creating and deleting the directory I wasn't able to change the creation or modification either. Is this a known property of directories in general? -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/