Dr Andrew Scott G7VAV

My photo
 
April 2024
Mo Tu We Th Fr Sa Su
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 1 2 3 4 5
6 7 8 9 10 11 12


service

Section: Maintenance Commands (8)
Updated: Jan 2006
Index Return to Main Contents

 

NAME

service - run a System V init script

 

SYNOPSIS

service SCRIPT COMMAND [OPTIONS]

service --status-all

service --help | -h | --version

 

DESCRIPTION

service runs a System V init script or upstart job in as predictable environment as possible, removing most environment variables and with current working directory set to /.

The SCRIPT parameter specifies a System V init script, located in /etc/init.d/SCRIPT, or the name of an upstart job in /etc/init. The existence of an upstart job of the same name as a script in /etc/init.d will cause the upstart job to take precedence over the init.d script. The supported values of COMMAND depend on the invoked script, service passes COMMAND and OPTIONS to the init script unmodified. For upstart jobs, start, stop, status, are passed through to their upstart equivilents. Restart will call the upstart 'stop' for the job, followed immediately by the 'start', and will exit with the return code of the start command. All scripts should support at least the start and stop commands. As a special case, if COMMAND is --full-restart, the script is run twice, first with the stop command, then with the start command. This option has no effect on upstart jobs.

service --status-all runs all init scripts, in alphabetical order, with the status command. This option only calls status for sysvinit jobs, upstart jobs can be queried in a similar manner with initctl list'.

 

EXIT CODES

service calls the init script and returns the status returned by it.

 

FILES

/etc/init.d
The directory containing System V init scripts.
/etc/init
The directory containing upstart jobs.

 

ENVIRONMENT

LANG, TERM
The only environment variables passed to the init scripts.

 

SEE ALSO

/etc/init.d/skeleton,
update-rc.d(8),
init(8),
invoke-rc.d(8).
initctl(8).


 

Index

NAME
SYNOPSIS
DESCRIPTION
EXIT CODES
FILES
ENVIRONMENT
SEE ALSO


for client 3.138.34.158
© Andrew Scott 2006 - 2024,
All Rights Reserved
http://www.andrew-scott.uk/
Andrew Scott
http://www.andrew-scott.co.uk/