AlterPath ACS Command Reference Guide
207
Administration
5.13 Start and Stop Services
This feature allows daemons (services) to be enabled or disabled without
need of reboot the unit. A simple engine detects configuration changes
(file comparison). This feature is implemented with shell scripts. There is
one main shell script called
daemon.sh
and one sourced shell script
(included by
daemon.sh
) for every daemon (service) that runs in the unit.
The shell script
daemon.sh
must be run once by inittab and every time a
configuration change is made. The
daemon.sh
reads a file
/etc/
daemon_list
which contains the names of all sourced shell scripts and
performs the start/stop/restart operation needed if any file related to
service was changed. The
daemon.sh
will keep a hidden copy, prefixed
with “.” and suffixed with .tmp, of all related files in the directory
/var/
run
.
Each sourced shell script has a set of mandatory shell variables handled
directly by the shell script
daemon.sh
. The sourced shell scripts may have
other shell variables not handled directly by daemon.sh. Such variables
have the sole purpose of facilitating the configuration of command line
parameters.
The mandatory shell variables define:
1. If the service is enabled or disabled. (ENABLE=YES/NO)
2. The pathname to the daemon. (DNAME=<daemon name, DPATH=<daemon
path>)
3. How to restart the daemon: by signal (kill, hup, term, etc) or by command
(start, stop. etc). (DTYPE=sig/cmd)
4. Signal to be sent to the daemon. Default is term. (DSIG=<signal>)
5. A list of configuration files. The files in this list will be checked for changes.
(ConfigFiles=<config file list>)
6. A initialization shell script that will be run before start the service. (Shell-
Init=<shell_script_name [command line parameters]>)
7. Command line parameters to start the daemon. (DPARM=<command line
parameters>)
8. Command Line parameters to stop the daemon. (DSTOP=<command line
parameters>)
The
daemon.sh
may be executed in two ways:
1. Without parameters in the command line, it will check the configuration files
of the service and restart or stop it if needed.
2. It will perform the requested action (stop/restart) in the list of services given in
the command line regardless any configuration changes.
Содержание AlterPath ACS
Страница 16: ...xvi Table of Contents...
Страница 29: ...13 This page has been left intentionally blank...
Страница 30: ...14 Preface...
Страница 68: ...52 Device Access...
Страница 86: ...70 Authentication Step 5 Saving changes To save the configuration run the command saveconf...
Страница 96: ...80 Authentication Save the configuration to flash 2 cli config savetoflash...
Страница 114: ...98 Authentication...
Страница 204: ...188 Administration To exit the CLI mode and return to ACS s shell issue the command cli quit...
Страница 268: ...252 Power Management with AlterPath PM Integration...
Страница 304: ...288 PCMCIA Cards Integration...
Страница 338: ...322 Profile Configuration...
Страница 364: ...348 Additional Features and Applications...
Страница 376: ...360 Appendix A New User Background Information...
Страница 406: ...390 Appendix C Cabling and Hardware Information This page has been left intentionally blank...
Страница 418: ...402 List of Tables...
Страница 420: ...404 List of Figures...