Running postgres as a "service" under w32 (9x/NT/2k)
От | S.L. |
---|---|
Тема | Running postgres as a "service" under w32 (9x/NT/2k) |
Дата | |
Msg-id | 20001120143016.28806.qmail@ww184.netaddress.usa.net обсуждение исходный текст |
Список | pgsql-ports |
Here's a trick I use to start various unix "daemons" (apache, sshd) under windows, without starting a cygwin console, or keeping one activated while the program is running (actually, for postgres, I use a php script to start from apache, but it would work 100%). I've written some "wrappers" for executables of the daemons, simple shell scripts that (most important) defines the actual PATH needed for the program in the second line, after #!/bin/sh line. After that I wrote the command line with complete options for the program to be launched. I'm starting a cygwish80 graphical console where I execute a command like "exec c:\cygwin\bin\bash /<full_cygwin_name_of_the_script>". Closing tbe cygwish window the launched app remains in background. It is not listed in Services Control Panel on NT or W2k, can be stopped from task manager. Here's an example with what I use to start sshd: ---------------------- #!/usr/bin export PATH=/bin:/usr/bin:/usr/local/bin:.:~/ /usr/local/sbin/sshd ---------------------- to start it as a background I'm starting a cygwish console and do an "exec c:\cygwin\bin\bash /usr/users/administrator/sshd" and an "exit". It's easy to make a shortcut for this, if you put the "exec [...]" line in a start-sshd.tcl file which would be executed by cygwish. Success! SLao ____________________________________________________________________ Get your own FREE, personal Netscape WebMail account today at http://home.netscape.com/webmail
В списке pgsql-ports по дате отправления: