03/01/2009, 15:55:14
Salut,
Je viens de regarder comment lancer des services sous windows. Il
semble que cygwin fournisse une commande pour faire ça.
Je n'ai pas essayé, mais ça devrait être quelque chose du genre:
cygrunsrv -I eibd -p /usr/local/bin/eibd -a "-t65535 -D -S -T -i ipt:
192.168.1.35:3671"
cygrunsrv -I linknx -p /usr/local/bin/linknx -a "-c/linknx-0.0.1.25/
conf/linknx.xml"
Ci dessous l'aide en ligne pour cygrunsrv.
A+
Jean-François
D:\>"d:\programs\cygwin\bin\cygrunsrv.exe" --help
Usage: /usr/bin/cygrunsrv [OPTION]...
Main options: Exactly one is required.
-I, --install <svc_name> Installes a new service named <svc_name>.
-R, --remove <svc_name> Removes a service named <svc_name>.
-S, --start <svc_name> Starts a service named <svc_name>.
-E, --stop <svc_name> Stops a service named <svc_name>.
-Q, --query <svc_name> Queries a service named <svc_name>.
-L, --list Lists services that have been installed
with cygrunsrv.
Required install options:
-p, --path <app_path> Application path which is run as a
service.
Miscellaneous install options:
-a, --args <args> Optional string with command line options
which
is given to the service application on
startup.
-c, --chdir <directory> Optional directory which will be used as
working
directory for the application.
-e, --env <VAR=VALUE> Optional environment strings which are
added
to the environment when service is
started.
You can add up to 255 environment strings
using
the `--env' option.
Note: /bin is always added to $PATH to
allow all
started applications to find at least
cygwin1.dll.
-d, --disp <display name> Optional string which contains the display
name
of the service. Defaults to service name.
-f, --desc <description> Optional string which contains the service
description.
-t, --type [auto|manual] Optional start type of service. Defaults
to `auto'.
-u, --user <user name> Optional user name to start service as.
Defaults to SYSTEM account.
-w, --passwd <password> Optional password for user. Only needed
if a user is given. If a user has an empty
password, enter `-w '. If a user is given
but
no password, cygrunsrv will ask for a
password
interactively.
-s, --termsig <signal> Optional signal to send to service
application
when service is stopped. <signal> can be
a number
or a signal name such as HUP, INT, QUIT,
etc.
Default is TERM.
-y, --dep <svc_name2> Optional name of service that must be
started
before this new service. The --dep option
may
be given up to 16 times, listing another
dependent
service each time.
-0, --stdin <file> Optional input file used for stdin
redirection.
Default is /dev/null.
-1, --stdout <file> Optional output file used for stdout
redirection.
Default is /var/log/<svc_name>.log.
-2, --stderr <file> Optional output file used for stderr
redirection.
Default is /var/log/<svc_name>.log.
-x, --pidfile <file> Optional path for .pid file written by
application
after fork().
Default is that application must not fork
().
-n, --neverexits Service should never exit by itself.
-o, --shutdown Stop service application during system
shutdown.
-i, --interactive Allow service to interact with the
desktop.
-j, --nohide Don't hide console window when service
interacts
with desktop.
Informative output:
-V, --verbose When used with --query or --list, causes
extra
information to be printed.
-h, --help print this help, then exit.
-v, --version print cygrunsrv program version number,
then exit.
Report bugs to <cygwin@cygwin.com>.
D:\>
D:\>
On 2 jan, 15:05, Chrystof <i...@accessnight.ch> wrote:
> Bonjour,
>
> J'ai réussi à faire fonctionner linknx sur cygwin (Emulateur linux sur
> windows).
>
> Je fais tourner sur la même machine, mais sur windows vista knxweb via
> le serveur web WAMP =>http://www.wampserver.com/
>
> Tout fonctionne à merveille via un N148/21, j'ai bien essayé de faire
> fonctionner directement sur le port USB mais cygwin n'aime pas cela.
>
> Maintenant pour démarrer, je lance 2 fenêtres cygwin et je tape :
>
> dans la permière : eibd -t65535 -D -S -T -i ipt:
> 192.168.1.35:3671
> dans la deuxième : linknx -c/linknx-0.0.1.25/conf/linknx.xml
>
> Je voudrais automatiser le lancement de ces 2 lignes via un batch ou
> autre système, qqun peut-il m'aider ?
>
> Bonne année.
>
> Chrystof
Je viens de regarder comment lancer des services sous windows. Il
semble que cygwin fournisse une commande pour faire ça.
Je n'ai pas essayé, mais ça devrait être quelque chose du genre:
cygrunsrv -I eibd -p /usr/local/bin/eibd -a "-t65535 -D -S -T -i ipt:
192.168.1.35:3671"
cygrunsrv -I linknx -p /usr/local/bin/linknx -a "-c/linknx-0.0.1.25/
conf/linknx.xml"
Ci dessous l'aide en ligne pour cygrunsrv.
A+
Jean-François
D:\>"d:\programs\cygwin\bin\cygrunsrv.exe" --help
Usage: /usr/bin/cygrunsrv [OPTION]...
Main options: Exactly one is required.
-I, --install <svc_name> Installes a new service named <svc_name>.
-R, --remove <svc_name> Removes a service named <svc_name>.
-S, --start <svc_name> Starts a service named <svc_name>.
-E, --stop <svc_name> Stops a service named <svc_name>.
-Q, --query <svc_name> Queries a service named <svc_name>.
-L, --list Lists services that have been installed
with cygrunsrv.
Required install options:
-p, --path <app_path> Application path which is run as a
service.
Miscellaneous install options:
-a, --args <args> Optional string with command line options
which
is given to the service application on
startup.
-c, --chdir <directory> Optional directory which will be used as
working
directory for the application.
-e, --env <VAR=VALUE> Optional environment strings which are
added
to the environment when service is
started.
You can add up to 255 environment strings
using
the `--env' option.
Note: /bin is always added to $PATH to
allow all
started applications to find at least
cygwin1.dll.
-d, --disp <display name> Optional string which contains the display
name
of the service. Defaults to service name.
-f, --desc <description> Optional string which contains the service
description.
-t, --type [auto|manual] Optional start type of service. Defaults
to `auto'.
-u, --user <user name> Optional user name to start service as.
Defaults to SYSTEM account.
-w, --passwd <password> Optional password for user. Only needed
if a user is given. If a user has an empty
password, enter `-w '. If a user is given
but
no password, cygrunsrv will ask for a
password
interactively.
-s, --termsig <signal> Optional signal to send to service
application
when service is stopped. <signal> can be
a number
or a signal name such as HUP, INT, QUIT,
etc.
Default is TERM.
-y, --dep <svc_name2> Optional name of service that must be
started
before this new service. The --dep option
may
be given up to 16 times, listing another
dependent
service each time.
-0, --stdin <file> Optional input file used for stdin
redirection.
Default is /dev/null.
-1, --stdout <file> Optional output file used for stdout
redirection.
Default is /var/log/<svc_name>.log.
-2, --stderr <file> Optional output file used for stderr
redirection.
Default is /var/log/<svc_name>.log.
-x, --pidfile <file> Optional path for .pid file written by
application
after fork().
Default is that application must not fork
().
-n, --neverexits Service should never exit by itself.
-o, --shutdown Stop service application during system
shutdown.
-i, --interactive Allow service to interact with the
desktop.
-j, --nohide Don't hide console window when service
interacts
with desktop.
Informative output:
-V, --verbose When used with --query or --list, causes
extra
information to be printed.
-h, --help print this help, then exit.
-v, --version print cygrunsrv program version number,
then exit.
Report bugs to <cygwin@cygwin.com>.
D:\>
D:\>
On 2 jan, 15:05, Chrystof <i...@accessnight.ch> wrote:
> Bonjour,
>
> J'ai réussi à faire fonctionner linknx sur cygwin (Emulateur linux sur
> windows).
>
> Je fais tourner sur la même machine, mais sur windows vista knxweb via
> le serveur web WAMP =>http://www.wampserver.com/
>
> Tout fonctionne à merveille via un N148/21, j'ai bien essayé de faire
> fonctionner directement sur le port USB mais cygwin n'aime pas cela.
>
> Maintenant pour démarrer, je lance 2 fenêtres cygwin et je tape :
>
> dans la permière : eibd -t65535 -D -S -T -i ipt:
> 192.168.1.35:3671
> dans la deuxième : linknx -c/linknx-0.0.1.25/conf/linknx.xml
>
> Je voudrais automatiser le lancement de ces 2 lignes via un batch ou
> autre système, qqun peut-il m'aider ?
>
> Bonne année.
>
> Chrystof