Creating the simple service
The service script
We are going to use tcpserver to create a service that tells you hello, and then gives some information about how it was invoked. The tcpserver program that it is based on sets (some of) the variables
Note the use of a "here-is" script in the server shell.
The tcpserver service
This script is itself invoked when a connection is made to the start-simple.sh script by tcpserver.
The tcpserver service manifest
The manifest tcpserver_manifest.xml is imported to create the service by the command
and the service is started or stopped by
where the name simple-server is the name of the service provided in the manifest.
The tcpserver service setup
A number of tasks to create needed directories and so on must be done before the service can begin, and that is all done by the setup program.
|zipped source code|