MySVC
an open source UNIX framework for shell script based web services provider
»Home
»Tools
»Man Page
»User Guide
»ChangeLog
»Installation
»Source Code
»Downloads
»FAQ
»Support
»License

»My Apps

Davide Cucciniello <davide6169@gmail.com>

NAME

mysvcd - My Service Daemon - an expect script implementing a generic configurable TCP/IP server based on shell or expect script for application logic

SYNOPSIS

Test Server: mysvcd [-l] [-p <port>]

Generic Server (default if /path/to/server is specified): mysvcd [-1] [-l|-d [-l -o <logfile> [-L <loglevels>]]] [-p <port>] /path/to/server

Simple Server: mysvcd -s [-1] [-l|-d [-l -o <logfile> [-L <loglevels>]]] [-p <port>] /path/to/server

Web Server: mysvcd -w [-1] [-l|-d [-l -o <logfile>] [-L <loglevels>]] [-p <port>] /path/to/(server|root)

Proxy Server: mysvcd -x [-l|-d [-l -o <logfile>] [-L <loglevels>]] [-p <port>] <host>[:<port>]

Expect Server (internal): mysvcd -e [-l|-d [-l -o <logfile>] [-L <loglevels>]] [-p <port>] [-q "<queues>"] [-u "<users>"] -f <configfile> -c <configproc>

Expect Server (external): mysvcd -r [-l|-d [-l -o <logfile>] [-L <loglevels>]] [-p <port>] [-q "<queues>"] [-u "<users>"] -f <configfile> -c <configproc>

Generic Client: mysvcd [-l|-d [-l -o <logfile>] [-L <loglevels>]] [-p <port>] <host>[:<port>]

-h => help
-l => enable log
-d => run in background as daemon
-1 => for generic server share a single instance of server for all clients
      for simple server keep opened the connection with clients after server exit
      for web server accept one client connection a time

DESCRIPTION

Test Server: put on stdout requests from client and get from stdin responses for client

Generic Server (default if /path/to/server is specified): put on server stdin requests from client get from server stdout response for client where server is any executable application

Simple Server: put on server stdin each line read from client as request get from server stdout response for client

Web Server: if server is specified put on server stdin HTTP GET or POST requests from client get from server stdout HTTP responses for client, if root is specified return to clients server files corresponding to HTTP requests

Proxy Server: run as proxy server from clients and remote server <host>:<port>, if <port> is not specified then default port is used

Expect Server (internal): expect based server where client requests are calling to expect procedures configured on expect script <configfile> with <configproc> being an expect procedure inside <configfile> returing a list of <name,value> configuration parameters where expect procedure output is returned to client and by default using "kill -9 SIGUSR1 <pid>" the configuration file is reloaded and using "kill -9 SIGUSR2 <pid>" the server status is swapped from ON to OFF)

Expect Server (external): expect based server where client requests are calling to expect procedures configured on expect script <configfile> with <configproc> being an expect procedure inside <configfile> returing a list of <name,value> configuration parameters where the expect procedures return the path of an external command to execute whose standard output is returned to client and by default using "kill -9 SIGUSR1 <pid>" the configuration file is reloaded and using "kill -9 SIGUSR2 <pid>" the server status is swapped from ON to OFF)

Generic Client: run as client for remote server <host>:<port>

OPTIONS

-h

help

-p <port>

specify tcp/ip port when mysvcd is used as tcp/ip server

-s

use mysvcd as simple server

-w

use mysvcd as web server

-x

use mysvcd as proxy server

-e

use mysvcd as expect based server (internal)

-r

use mysvcd as expect based server (external)

-f <configfile>

specify the path of configuration file

-c <configproc>

specify the name of configuration procedure

-q <queues>

specify a couple of directory related to input and output queues

-u <users>

specify a list of username/password pairs

-l

enable log

-L <loglevels>

specify log levels

-o <logfile>

specify path of log file

-1

share a single instance of server (generic server) keep opened connection with client (simple server) accept one client connection a time (web server)

-d

specify the use of mysvcd server as daemon

EXIT STATUS

0

Success

BUGS

See the MySVCD distribution BUGS file.

AUTHOR

Written by Davide Cucciniello, <davide6169@gmail.com>

RESOURCES

Main web site: http://www.mysvc.it/

COPYING

Copyright (C) 2002-2009 Davide Cucciniello. Free use of this software is granted under the terms of the GNU General Public License (GPL).