home *** CD-ROM | disk | FTP | other *** search
- /*
- ** m a i n . c
- **
- ** main program for UPS monitor daemon
- **
- ** Arthur W. Neilson III
- ** art@pilikia.pegasus.com
- ** Sat Mar 30 1991
- */
-
- #include "common.h"
-
- /* default tuneables */
- char *ups_port = UPS_PORT;
- char *ups_shut = UPS_SHUT;
- char *ups_log = UPS_LOG;
- int ups_time = UPS_TIME;
-
- /* global descriptors */
- int ups_fd;
- int log_fd;
-
- main(argc, argv)
- int argc;
- char *argv[];
- {
- void getvars();
- void getoptions();
- void chkoptions();
- void mkdaemon();
-
- getvars(); /* retrieve environment vars */
- getoptions(argc, argv); /* process command line options */
- chkoptions(); /* validate command line options */
- mkdaemon(); /* fork daemon process */
- }
-