edrcinit
Package: WA2L/edrc 1.5.57
Section: Maintenance Commands (1m)
Updated: 29 September 2024
Index
Return to Main Contents
NAME
edrcinit - WA2L/edrc services startup/shutdown/restart/status
SYNOPSIS
edrc/bin/edrcinit
[
-h
]
edrcinit
(
start
|
stop
|
restart
|
refresh
|
status
|
statuslist
) [
name
]
edrcinit
list
|
guard
|
unguard
|
checknow
|
rcinstall
|
enable
|
disable
edrcinit
(
cfg-activate
|
cfg-unactivate
|
cfg-guard
|
cfg-unguard
)
name
AVAILABILITY
WA2L/edrc
DESCRIPTION
handle services start/stop/restart, primarily for daemons included
in WA2L/edrc, but other services can be handled as well.
edrcinit
supports to monitor and to restart a failed service based on the
definitions made in the
edrcinit.cfg
config file.
OPTIONS
- start
-
start WA2L/edrc service(s).
- stop
-
stop WA2L/edrc service(s).
When a guarded service is stopped using
'edrcinit stop
name'
it is not guarded until
'edrcinit start
[
name
]'
is invoked.
- restart
-
restart WA2L/edrc service(s).
A
restart
is equal to a
'edrcinit stop; edrcinit start'
invocation.
- refresh
-
restart a non interruptive service restart.
In the
edrcinit_handler
a restart should be implemented that way, that the
targeted service receives a command or signal, that causes a
non-interruptive restart. This is often implemented by
reacting to a received
SIGHUP
signal.
- status
-
print status of all activated service(s).
- statuslist
-
print status of all service(s) in list form.
- name
-
service name.
If this option is not specified, all defined and
activated service(s) are addressed.
- list
-
list all defined service(s).
- guard
-
guard the service(s).
With this option it is possible to switch
on the guarding of the services, that are defined to be guarded.
This option is only used after switching off the service guarding
using the
'edrcinit unguard'
command.
- unguard
-
Switch the guarding of the services globally off.
After a newstart of
edrcinit
or the invocation of
'edrcinit guard'
the guarding is switched on again.
- checknow
-
force an immediate service check.
- rcinstall
-
install a small rc script to the system related
init
directory
(/etc/init.d/,
/sbin/init.d/
or
/etc/init/)
and ensure that
edrcinit
is started on system boot.
- enable
-
globally enable the start of services handled thru
edrcinit
after the startup has been disabled using
edrcinit disable.
The prerequirement to ensure the start of
edrcinit
is the installation of the related rc script thru the
invocation of
edrcinit rcinstall.
- disable
-
globally disable the start of
edrcinit
even if
edrcinit rcinstall
has been invoked, but without the need to disable the
service startup system wide.
Even when the service startup has been disabled using the
edrcinit disable
command, services can still interactively be started, stopped, etc. using the
edrcinit
{
start
|
stop
|
...
}
- cfg-activate name
-
set
activated
in the configuration file for the service
name
to
Y.
- cfg-unactivate name
-
set
activated
in the configuration file for the service
name
to
N.
- cfg-guard name
-
set
guarded
in the configuration file for the service
name
to
Y.
- cfg-unguard name
-
set
guarded
in the configuration file for the service
name
to
N.
ENVIRONMENT
- $PRINT_FIT2WIDTH
-
If not set to
False,
the output when invoking the
list
option
is limited to the current width of the terminal window
and rows extending the window width are marked with '>>'.
If set to
False
the whole output line is printed and wrapped at the line end if
applicable.
EXIT STATUS
- 0
-
no error.
- 1
-
error in start/stop/restart/refresh/status of specified
service(s) or guard/unguard of services(s).
- 2
-
operating system not supported.
- 3
-
configfile does not exist.
- 4
-
usage listed.
- 5
-
specified service name (
name
) is not defined or is not activated.
- 8
-
edrinit
cannot write to logfile.
- 11
-
temporary directory could not be claimed or created in
/tmp.
Check the system temporary directory
/tmp
if you get this error, it is an indicator of system intrusion.
FILES
- etc/edrcinit.cfg
-
config file of
edrcinit.
- lib/edrcinit/
-
directory for handlers of the service(s) handled thru
edrcinit.
See
edrcinit.handler(3)
for additional information.
- lib/edrcinit/WA2Ledrc.edrcinit.check
-
check script of watchdog to guard the services in
edrcinit.
- lib/edrcinit/WA2Ledrc.edrcinit.bite
-
bite script of watchdog to guard the services in
edrcinit.
- var/log/edrcinit.log
-
log file of
edrcinit.
- var/edrcinit/settings
-
persistent data of
edrcinit.
- var/edrcinit/stopped
-
list of stopped services using the
'edrcinit stop
[
name
]'
command.
EXAMPLES
-
SEE ALSO
edrcintro(1),
edrcinit.cfg(4),
edrcinit.handler(3),
kill(1),
signal(7),
vsav(1),
watchdog(1)
NOTES
The guarding of the services is handled thru a watchdog with the name
EDRCINIT
which is started thru
edrcinit.
See
watchdog(1)
for more information.
BUGS
edrcinit
is tested on
Solaris,
HPUX,
RedHat Linux,
SuSE Linux,
Fedora Linux
and
Ubuntu Linux
and supports the specific
startup methods of the related operating system.
AUTHOR
edrcinit was developed by Christian Walther. Send suggestions
and bug reports to wa2l@users.sourceforge.net .
COPYRIGHT
Copyright © 2015 by
Christian Walther
This is free software; see
edrc/doc/COPYING
for copying conditions. There is ABSOLUTELY NO WARRANTY; not
even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
This document was created by man2html
using the manual pages.
Time: 00:14:01 GMT, March 08, 2025