sm

sysmgr implemented in C
git clone git://git.ckyln.com/sm
Log | Files | Refs | README | LICENSE

sysmgr.8 (1573B)


      1 .TH "SYSMGR" "8" "October 2020" "sysmgr-VERSION" "System Manager's Manual"
      2 .SH NAME
      3 sysmgr \- system manager
      4 .SH DESCRIPTION
      5 sysmgr is a service supervisor for UNIX systems. It executes the service scripts
      6 (usually shell scripts) from the service directory and restarts them if they go
      7 down.
      8 .SH USAGE
      9 The operation of sysmgr is manipulated through
     10 .BR svctl(1),
     11 and
     12 .BR RUNDIR
     13 and
     14 .BR SYSDIR
     15 environment variables.
     16 .SS Defining directories
     17 The service directory and the run directory can be defined both through the
     18 config.h file on compilation and during runtime from environment variables.
     19 .SS Service scripts
     20 Service scripts can be any executable, but are usually small shell scripts. Here
     21 is an example:
     22 .nf
     23 
     24     #!/bin/sh -e
     25     exec httpd -f -p 8054 -h /var/www/html
     26 
     27 .fi
     28 The exec call makes sure that sysmgr is tracking the pid of the actual process
     29 rather than the shell script itself.
     30 .SH SERVICE DEPENDENCIES
     31 sysmgr doesn't deal with service dependencies on its own, but a sysmgr-depends
     32 tool is provided in order to deal with such a requirement. You can use this tool
     33 in your service scripts to wait until a service is up. The usage is as follows:
     34 .nf
     35 
     36      #!/bin/sh -e
     37      sysmgr-depends dbus
     38      exec NetworkManager -n
     39 
     40 .fi
     41 .SH STARTING SYSMGR ON BOOT
     42 In order to start sysmgr, you need to implement it into your init\-scheme. For
     43 sysvinit and its clones (such as busybox\-init) add a line to your inittab as
     44 follows:
     45 
     46 .nf
     47 ::respawn:/usr/bin/sysmgr
     48 .fi
     49 
     50 .SH AUTHOR
     51 Cem Keylan <cem@ckyln.com>
     52 .SH SEE ALSO
     53 .BR svctl(1)
     54 .BR runsyssv(1)
     55 .BR sysmgr-depends(1)