v11i020: Idle demon

James Cummings james at dlss2.UUCP
Thu Aug 23 00:20:24 AEST 1990


Submitted-by: James Cummings <dlss2!james>
Posting-number: Volume 11, Issue 20
Archive-name: idle1.2/Part01


	This is another idle program.  I've seen, over a period of time,
  several scripts/programs that were supposed to monitor and log off 
  users after a set period of time.  Some of these were quite good while
  others were nothing more than quick shell scripts that did a quick and
  sometimes dirty job of eliminating the offending users.  But it always
  seemed that they lacked something.  What I have endevored to do with
  this program is combine some of the *important* features that *I* found
  appealing into one package.

	Some of the features of this program are:
	 o  Runs from a daemon (well, sortof) not from a cron.
	 o  Allows for a warning to idle users before logging them out.
	 o  Allows for logging of both warned and logged off users to
	       a file --- maybe for future use.
	 o  Allows for setting a separate day time and night time idle period.
	 o  Allows optional mailing to logged off users.
	 o  Gets idle time for user processes from utmp directly.
	 o  Immune users.


#! /bin/sh
# This is a shell archive.  Remove anything before this line, then unpack
# it by saving it into a file and typing "sh file".  To overwrite existing
# files, type "sh file -c".  You can also feed this as standard input via
# unshar, or by typing "sh <file", e.g..  If this archive is complete, you
# will see the following message at the end:
#		"End of shell archive."
# Contents:  header.h bailout.c check_idle.c get_max.c demon.c killit.c
#   main.c mesg.c immune.c README Makefile Manifest INSTALL Copyright
# Wrapped by james at dlss2 on Wed Aug 22 08:43:06 1990
PATH=/bin:/usr/bin:/usr/ucb ; export PATH
if test -f 'header.h' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'header.h'\"
else
echo shar: Extracting \"'header.h'\" \(2127 characters\)
sed "s/^X//" >'header.h' <<'END_OF_FILE'
X#include <stdio.h>
X#include <signal.h>
X#include <string.h>
X#include <time.h>
X#include <sys/types.h>
X#include <sys/stat.h>
X#include <utmp.h>
X
X#define REST     180	/* rest period between checks		*/
X#define	GRACE	  60	/* grace time (sec) for user reply 	*/
X#define	KWAIT	  20	/* time to wait after kill (in sec) 	*/
X#define	WARNING	   1	/* a warning message			*/
X#define	LOGOFF	   2	/* a log-off message    		*/
X#define	NOLOGOFF   3	/* a log-off failure message 		*/
X#define SEC	  60	/* seconds per minute   		*/
X#define START_DAY  8	/* start time of daytime cycle		*/
X#define END_DAY   17    /* end time of daytime cycle		*/
X#define DAY_MAX   3    /* daytime max idle allowed		*/
X#define NIGHT_MAX 45    /* nighttime max idle allowed 		*/
X#define AB_MAX    60	/* nobody allowed past this unless immune */
X			
X			/* Path to the executibles		*/
X#define BIN 	"/usr/ulbin"
X
X			/* Name of the autologout program	*/
X			/* This must match here and the Makefile*/
X#define APROG	"autologout"
X
X			/* Path to your favorite mailer		*/
X#define MAIL      "/bin/mail"
X
X#undef EXT_USERS	/* NOT IMPLEMENTED IN THIS VERSION	*/
X			/* defined only if you allow some users */
X			/*   extended idle time			*/
X
X#define IMMUNE_USERS	/* defined only if you allow immunity   */
X			/*   to some users			*/
X			/* HIGHLY RECOMMENDED!!!! NOTE: "root"  */
X			/*  will be immune unless you specify   */
X			/* below, but sysadm and such will NOT  */
X
X#undef KILL_ROOT	/* Not recommended..should not, but     */
X			/*  could kill processes that you don't */
X			/*  want killed..../etc/cron(?)         */
X			/* This code needs further testing at   */
X			/*  this time - jbc                     */
X
X#ifdef EXT_USERS	/* File to look up extended users */
X#define EXT_FILE    "extend.usr"	
X#endif
X
X#ifdef IMMUNE_USERS	/* File to look up immune users */
X#define IMMUNE_FILE "/usr/adm/immune.usr" 
X#endif
X
X			/* File to record warnings and logouts	*/
X#define LOG_FILE    "/usr/adm/logout.log"
X
struct utmp *utmpp;	 /* pointer to utmp file entry 		*/
char 	    *ctime();	 /* returns pointer to time string 	*/
struct utmp *getutent(); /* returns next utmp file entry 	*/
END_OF_FILE
if test 2127 -ne `wc -c <'header.h'`; then
    echo shar: \"'header.h'\" unpacked with wrong size!
fi
# end of 'header.h'
fi
if test -f 'bailout.c' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'bailout.c'\"
else
echo shar: Extracting \"'bailout.c'\" \(711 characters\)
sed "s/^X//" >'bailout.c' <<'END_OF_FILE'
static char rcsid[] = "@(#)$Id: bailout.c,v 2.0  07/18/90  jbc $";
X/***************************************************************************/
X/* Copyright (c) 1990  James B. Cummings, Jr.                              */
X/*                                                                         */
X/*  This program is offered in the Public Domain and is freely available   */
X/*    as long as this notice is kept intact with each module.              */
X/***************************************************************************/
X#include "header.h"
X
bailout(message, status)	/* display error message and exit */
int status;
char *message;
X{
X	fprintf(stderr, "autologout: %s\n", message);
X	exit(status);
X}
END_OF_FILE
if test 711 -ne `wc -c <'bailout.c'`; then
    echo shar: \"'bailout.c'\" unpacked with wrong size!
fi
# end of 'bailout.c'
fi
if test -f 'check_idle.c' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'check_idle.c'\"
else
echo shar: Extracting \"'check_idle.c'\" \(2044 characters\)
sed "s/^X//" >'check_idle.c' <<'END_OF_FILE'
static char rcsid[] = "@(#)$Id: check_idle.c,v 2.0  07/18/90  jbc $";
X/***************************************************************************/
X/* Copyright (c) 1990  James B. Cummings, Jr.                              */
X/*                                                                         */
X/*  This program is offered in the Public Domain and is freely available   */
X/*    as long as this notice is kept intact with each module.              */
X/***************************************************************************/
X#include "header.h"
X
int
check_idle(max_time)		/* Select utmp entries older than max_time */
int max_time;
X{
X	char dev[24], name[12];
X	int fid;
X	struct stat status, *pstat;
X	time_t idle, pres_time, start, time();
X
X	pstat = &status;
X
X	if (utmpp->ut_type != USER_PROCESS) /* Leave the non-user alone */
X		return(0);
X
X	strncpy(name, utmpp->ut_user, 8);	/* else get user name */
X	name[8] = '\0';				/* term with null     */
X
X#ifndef KILL_ROOT
X	if(strcmp(name,"root") == 0)
X		return(0);
X#endif
X
X#ifdef IMMUNE_USERS
X	if (immune(name) != 0)		/*Leave the immunes alone */
X		return(0);
X#endif
X
X	if ((fid = fork()) < 0) 
X		bailout("can't fork", 1);
X
X	if (fid == 0) {
X		strcpy(dev,"/dev/");
X		strcat(dev, utmpp->ut_line);	/* Here's the line device */
X	
X		if((stat(dev, pstat)) < 0)
X			bailout("can't get status of user's terminal", 1);
X	
X		pres_time = time((time_t *)0);	/* get the current time */
X	
X			/* idle time is current less last access time */
X
X		idle = (pres_time - pstat->st_atime)/SEC;
X		if(idle < max_time)
X			exit(1);
X
X		mesg(WARNING,name,dev,(int)idle);	/* warn user          */
X		if(stat(dev,pstat))
X			bailout("can't get status of user's terminal",2);
X
X		start = pstat->st_atime;
X		sleep(GRACE);
X
X		if(stat(dev,pstat))
X			bailout("can't get status of user's terminal",3);
X		if(start < pstat->st_atime) 
X			exit(1);
X		
X		else {
X			if(!killit(utmpp->ut_pid))
X				mesg(NOLOGOFF, name, dev, (int)idle);
X
X			else mesg(LOGOFF, name, dev, (int)idle);
X
X			exit(1);
X		}
X  	}
X	while(wait(&status) != fid)
X		;
X}
END_OF_FILE
if test 2044 -ne `wc -c <'check_idle.c'`; then
    echo shar: \"'check_idle.c'\" unpacked with wrong size!
fi
# end of 'check_idle.c'
fi
if test -f 'get_max.c' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'get_max.c'\"
else
echo shar: Extracting \"'get_max.c'\" \(854 characters\)
sed "s/^X//" >'get_max.c' <<'END_OF_FILE'
static char rcsid[] = "@(#)$Id: get_max.c,v 2.0  07/18/90  jbc $";
X/***************************************************************************/
X/* Copyright (c) 1990  James B. Cummings, Jr.                              */
X/*                                                                         */
X/*  This program is offered in the Public Domain and is freely available   */
X/*    as long as this notice is kept intact with each module.              */
X/***************************************************************************/
X#include "header.h"
X
int get_max()
X{
X	struct tm mytime;
X	int  minutes, logout;
X	long clock;
X	long now;
X
X	now = time(&clock);
X	memcpy( &mytime,  localtime(&clock),  sizeof(mytime));
X
X	if((mytime.tm_hour >= START_DAY) && (mytime.tm_hour < END_DAY)) {
X		logout = DAY_MAX;
X	}
X	else logout = NIGHT_MAX;
X
X	return(logout);
X
X}
END_OF_FILE
if test 854 -ne `wc -c <'get_max.c'`; then
    echo shar: \"'get_max.c'\" unpacked with wrong size!
fi
# end of 'get_max.c'
fi
if test -f 'demon.c' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'demon.c'\"
else
echo shar: Extracting \"'demon.c'\" \(933 characters\)
sed "s/^X//" >'demon.c' <<'END_OF_FILE'
static char rcsid[] = "@(#)$Id: idle_demon.c,v 2.1  07/18/90  jbc $";
X/***************************************************************************/
X/* Copyright (c) 1990  James B. Cummings, Jr.                              */
X/*                                                                         */
X/*  This program is offered in the Public Domain and is freely available   */
X/*    as long as this notice is kept intact with each module.              */
X/***************************************************************************/
X#include "header.h"
X
main()
X{
X	char path[80];
X	int i;
X	int fid, status;
X	void perror();
X
X	for(i = 0;i <= 79;i++)
X		path[i] == '\0';
X
X	(void) strcpy(path,BIN);
X	(void) strcat(path,"/");
X	(void) strcat(path,APROG);
X
X	for(;;) {
X		if((fid = fork()) < 0)
X			perror("fork");
X
X		if(fid == 0) {
X			execl(path,"idle_check",0);
X			exit(1);
X		}
X		while(wait(&status) != fid)
X			;
X		(void) sleep(120);
X	}
X}
END_OF_FILE
if test 933 -ne `wc -c <'demon.c'`; then
    echo shar: \"'demon.c'\" unpacked with wrong size!
fi
# end of 'demon.c'
fi
if test -f 'killit.c' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'killit.c'\"
else
echo shar: Extracting \"'killit.c'\" \(944 characters\)
sed "s/^X//" >'killit.c' <<'END_OF_FILE'
static char rcsid[] = "@(#)$Id: killit.c,v 2.0  07/18/90  jbc $";
X/***************************************************************************/
X/* Copyright (c) 1990  James B. Cummings, Jr.                              */
X/*                                                                         */
X/*  This program is offered in the Public Domain and is freely available   */
X/*    as long as this notice is kept intact with each module.              */
X/***************************************************************************/
X#include "header.h"
X
killit(pid)
int pid;
X{
X	kill(pid, SIGHUP);		/* first send "hangup" signal */
X	sleep(KWAIT);
X
X	if (!kill(pid,0)) {		/* SIGHUP might be ignored   */
X		kill(pid, SIGKILL);	/* should do the trick       */
X		sleep(KWAIT);
X		if (!kill(pid,0))
X			return(0);	/* failure refuse to die     */
X		else
X			return(1);	/* successful kill	     */
X	} else
X		return(1);		/* successful kill with SIGHUP */
X}
END_OF_FILE
if test 944 -ne `wc -c <'killit.c'`; then
    echo shar: \"'killit.c'\" unpacked with wrong size!
fi
# end of 'killit.c'
fi
if test -f 'main.c' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'main.c'\"
else
echo shar: Extracting \"'main.c'\" \(718 characters\)
sed "s/^X//" >'main.c' <<'END_OF_FILE'
static char rcsid[] = "@(#)$Id: main.c,v 2.0  07/18/90  jbc $";
X/***************************************************************************/
X/* Copyright (c) 1990  James B. Cummings, Jr.                              */
X/*                                                                         */
X/*  This program is offered in the Public Domain and is freely available   */
X/*    as long as this notice is kept intact with each module.              */
X/***************************************************************************/
X#include "header.h"
X
main()
X{
X	int max_time;
X
X	max_time = get_max();	/* go figure the max time allowed */
X	while ((utmpp = getutent()) != (struct utmp *) NULL)
X		check_idle(max_time);
X}
END_OF_FILE
if test 718 -ne `wc -c <'main.c'`; then
    echo shar: \"'main.c'\" unpacked with wrong size!
fi
# end of 'main.c'
fi
if test -f 'mesg.c' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'mesg.c'\"
else
echo shar: Extracting \"'mesg.c'\" \(2139 characters\)
sed "s/^X//" >'mesg.c' <<'END_OF_FILE'
static char rcsid[] = "@(#)$Id: mesg.c,v 2.0  07/18/90  jbc $";
X/***************************************************************************/
X/* Copyright (c) 1990  James B. Cummings, Jr.                              */
X/*                                                                         */
X/*  This program is offered in the Public Domain and is freely available   */
X/*    as long as this notice is kept intact with each module.              */
X/***************************************************************************/
X#include "header.h"
X
mesg(flag, name, dev, idle)
int flag, idle;
char *name, *dev;
X{
X	char mbuf[256];		/* message buffer */
X	time_t tvec;
X	FILE *fopen(), *fp, *log, *mprog;
X
X	time(&tvec);		/* store the time in tvec */
X	if((log = fopen(LOG_FILE, "a")) == (FILE *) NULL)
X		bailout("can't open log file",4);
X
X	if(flag == WARNING) {
X		if((fp = fopen(dev,"w")) == (FILE *) NULL)
X			bailout("can't open user's terminal", 5);
X		fprintf(fp,
X			"\n%s: You've been idle for %d min.\007\n",name,idle);
X		fprintf(fp,
X		"you'll be logged off in 60 sec. unless you hit return.\n");
X
X		fclose(fp);
X		fprintf(log, "WARNING: %s %s (%d min idle time) %s",
X			name, dev+5, idle, ctime(&tvec)+3);
X	}
X
X	if(flag == LOGOFF) {
X		fprintf(log, "LOGOFF:  %s %s (%d min idle time) %s",
X		   name, dev+5, idle, ctime(&tvec)+3);
X		sprintf(mbuf,"%s %s", MAIL, name);
X
X		/* pipe to mail program for writing */
X		if((mprog = popen(mbuf, "w")) == (FILE *) NULL)
X			bailout("can't use MAIL program",6);
X
X		fprintf(mprog, "Subject: Excess Idle Time\n %s,\n\tYou were logged off after %d min idle time at - %s\n",name,idle, ctime(&tvec));
X
X		fclose(mprog);
X	}
X
X	if(flag == NOLOGOFF) {	      /* Send mail to root if can't kill */
X		fprintf(log, "==>LOGOFF-FAIL %s (pid = %d) %s (%d min idle time) %s\n", name ,utmpp->ut_pid, dev+5, idle, ctime(&tvec)+3);
X		sprintf(mbuf, " %s root",MAIL );
X		if((mprog = popen(mbuf, "w")) == (FILE *) NULL)
X			bailout("can't use MAIL program\n", 7);
X		fprintf(mprog,"Subject: Can't logoff %s\nCan't Log off - %s %s\ntty = %s\n", name, name, ctime(&tvec), dev+5);
X		fclose(mprog);
X	}
X
X	fclose(log);
X	return(0);
X}
END_OF_FILE
if test 2139 -ne `wc -c <'mesg.c'`; then
    echo shar: \"'mesg.c'\" unpacked with wrong size!
fi
# end of 'mesg.c'
fi
if test -f 'immune.c' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'immune.c'\"
else
echo shar: Extracting \"'immune.c'\" \(974 characters\)
sed "s/^X//" >'immune.c' <<'END_OF_FILE'
static char rcsid[] = "@(#)$Id: immune.c,v 2.1  07/23/90  jbc $";
X/***************************************************************************/
X/* Copyright (c) 1990  James B. Cummings, Jr.                              */
X/*                                                                         */
X/*  This program is offered in the Public Domain and is freely available   */
X/*    as long as this notice is kept intact with each module.              */
X/***************************************************************************/
X#include "header.h"
X
int
immune(user)
char **user;
X{
X	FILE *imfp;
X	char *name, s[22];
X	char *lastc, *strchr();
X	int ret;
X
X	if((imfp = fopen(IMMUNE_FILE,"r")) < 0) {
X		perror("immune.file");
X		ret = 1;
X	}
X	else {
X		while ((name = fgets(s,20,imfp)) != (char *)0) {
X			if(lastc = strchr(name,'\n'));
X				*lastc = '\0';
X			if(strcmp(user,name) == 0) {
X				ret = 1;
X				break;
X			}
X			else ret = 0;
X		}
X	}
X	(void) fclose(imfp);
X	return(ret);
X
X}
END_OF_FILE
if test 974 -ne `wc -c <'immune.c'`; then
    echo shar: \"'immune.c'\" unpacked with wrong size!
fi
# end of 'immune.c'
fi
if test -f 'README' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'README'\"
else
echo shar: Extracting \"'README'\" \(2361 characters\)
sed "s/^X//" >'README' <<'END_OF_FILE'
X	This is another idle program.  I've seen, over a period of time,
X  several scripts/programs that were supposed to monitor and log off 
X  users after a set period of time.  Some of these were quite good while
X  others were nothing more than quick shell scripts that did a quick and
X  sometimes dirty job of eliminating the offending users.  But it always
X  seemed that they lacked something.  What I have endevored to do with
X  this program is combine some of the *important* features that *I* found
X  appealing into one package.
X
X	Some of the features of this program are:
X	 o  Runs from a daemon (well, sortof) not from a cron.
X	 o  Allows for a warning to idle users before logging them out.
X	 o  Allows for logging of both warned and logged off users to
X	       a file --- maybe for future use.
X	 o  Allows for setting a separate day time and night time idle period.
X	 o  Allows optional mailing to logged off users.
X	 o  Gets idle time for user processes from utmp directly.
X	 o  Immune users.
X
X	Some of the features I plan to add:
X	 -  Improve daemon qualities of program
X	 -  Varible time limits for selected users.
X	 -  Custom messages to offending users.
X	 -  Feature to, optionally, "nag" repeat offenders at their login time.
X
X	A WARNING:
X	I HAVE FOUND THAT THE BOOT TIME SCRIPT DOES NOT WORK!  PLEASE DON'T
USE THIS METHOD.... I AM WORKING ON A MORE RELIABLE WAY TO IMPLEMENT THIS!
X
X	If you find bugs, let me know, I'd like to see this program bug free :-)
If you have a suggestion, and better yet code to support it, let me know.
This is known to run on an AT&T 3B2/700 SYSV 3.2.1 .  I don't have access to
a BSD or VMS machine, so I'm not attempting to port to those machines, although
I don't think it would be a major job.  I know BSD user will have to play with
get_max.c which has a memcpy function in it.  There is a BSD function for this,
bcopy I think.  BSD users will also have to look at immune.c which has a call
to "strchr", you will need to substitute an index call.  If someone with 
access to the proper machine would like to volunteer the code diffs, I will 
include them in the next release.
X
X				James B. Cummings
X				e-mail:
X   				UUCP:      
X      				{...texsun!csccat!dalnet
X       				...void!dalnet
X       				...swblat!texbell!texnet
X       				...swgate!dlss1             }!dlss2!james
X   				NET: 
X      				jc at smunews 
END_OF_FILE
if test 2361 -ne `wc -c <'README'`; then
    echo shar: \"'README'\" unpacked with wrong size!
fi
# end of 'README'
fi
if test -f 'Makefile' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'Makefile'\"
else
echo shar: Extracting \"'Makefile'\" \(1285 characters\)
sed "s/^X//" >'Makefile' <<'END_OF_FILE'
SHARNAME = Idle
CFLAGS = -O -s
X
X# For BIN and APROG, if you change them here they must be change
X# 	in header.h also!
X#  
BIN = /usr/ulbin
APROG = autologout
X
DPROG = idle_demon
X
OTHERF = README Makefile Manifest INSTALL Copyright
HFILES = header.h 
CFILES = bailout.c check_idle.c get_max.c demon.c killit.c main.c mesg.c\
X	 immune.c
X
AOBJS = main.o check_idle.o killit.o mesg.o bailout.o get_max.o immune.o
DOBJS = demon.o
X
all:    autologout demon
X
autologout: $(AOBJS)
X	cc $(CFLAGS) -o $(APROG) $(AOBJS) 
X
demon:  $(DOBJS)
X	cc $(CFLAGS) -o $(DPROG) $(DOBJS)
X
install: all
X	mv $(APROG) $(BIN)/$(APROG)
X	chmod 700 $(BIN)/$(APROG)
X	chown root $(BIN)/$(APROG)
X	mv $(DPROG) $(BIN)/$(DPROG)
X	chmod 700 $(BIN)/$(DPROG)
X	chown root $(BIN)/$(DPROG)
X
clean:
X	@echo "Cleaning....
X	@rm -f *.o core a.out $(APROG) $(DPROG)
X	@echo "            ...Done!"
X
shar:   clean
X	@echo "About to CREATE PACKAGE!"
X	@shar $(HFILES) $(CFILES) $(OTHERF) > $(SHARNAME)
X	@echo "DONE WITH KIT!"
X
compress:
X	@echo "Compressing kits...."
X	@compress $(SHARNAME)*
X
remove:
X	@echo "Removing executibles from $(BIN)"
X	@sleep 2
X	@echo "Going..."
X	@sleep 2
X	@echo "        ...going..."
X	@sleep 2
X	@rm -rf $(BIN)/$(APROG) $(BIN)/$(DPROG)
X	@echo "                   GONE!!!"
X	@echo "Be sure to remove the old logout.logs!
END_OF_FILE
if test 1285 -ne `wc -c <'Makefile'`; then
    echo shar: \"'Makefile'\" unpacked with wrong size!
fi
# end of 'Makefile'
fi
if test -f 'Manifest' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'Manifest'\"
else
echo shar: Extracting \"'Manifest'\" \(527 characters\)
sed "s/^X//" >'Manifest' <<'END_OF_FILE'
X			MANIFEST
X
X   File Name		Archive #	Description
X-----------------------------------------------------------
X Makefile                   1	
X Manifest                   1	
X README                     1	
X bailout.c                  1	
X boot.idle                  1	
X check_idle.c               1	
X demon.c                    1	
X get_max.c                  1	
X header.h                   1	
X killit.c                   1	
X main.c                     1	
X mesg.c                     1	
X INSTALL		    1
X Copyright                  1
END_OF_FILE
if test 527 -ne `wc -c <'Manifest'`; then
    echo shar: \"'Manifest'\" unpacked with wrong size!
fi
# end of 'Manifest'
fi
if test -f 'INSTALL' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'INSTALL'\"
else
echo shar: Extracting \"'INSTALL'\" \(929 characters\)
sed "s/^X//" >'INSTALL' <<'END_OF_FILE'
INSTALLATION:
X
X	If you are on a System V machine this is going to be REAL SIMPLE.
Otherwise you'll have to be prepared for a little work.  This is not,
at least at this time, going to be portable to other than SYSV.
X
X	Edit the Makefile and the header.h file to your liking.  Note that
there are some notes in those files about two items APROG and BIN.  They
MUST MATCH IN BOTH FILES.  Once you have everything as you want it, you
can just type "make".  The essential programs will be built.  To install
and run the program you will need to have super user status...sorry folks.
X
X	You will also need to create an "immune file" for the users who
will not be touched by the idle_demon.  Root is should be immune unless
you define KILL_ROOT in the "header.h" file.
X
X	One of the things you should consider NOT doing at this time is
trying to run this as a daemon from your rc2.d directory.  Until I refine
the program, or you do so.
X
END_OF_FILE
if test 929 -ne `wc -c <'INSTALL'`; then
    echo shar: \"'INSTALL'\" unpacked with wrong size!
fi
# end of 'INSTALL'
fi
if test -f 'Copyright' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'Copyright'\"
else
echo shar: Extracting \"'Copyright'\" \(972 characters\)
sed "s/^X//" >'Copyright' <<'END_OF_FILE'
X/***************************************************************************/
X/* Copyright (c) 1990  James B. Cummings, Jr.                              */
X/*                                                                         */
X/*  This program is offered in the Public Domain and is freely available   */
X/*    as long as this notice is kept intact with each module.              */
X/*  Further, I specifiy that you not attempt to make money from the        */
X/*    distribution and/or sale of this software.                           */
X/*  No warrantees or responsibility is assumed by the author for use of    */
X/*    this software.  Compile and use at your own risk.                    */
X/***************************************************************************/
James Cummings 
X   UUCP:      
X      {...texsun!csccat!dalnet
X       ...void!dalnet
X       ...swblat!texbell!texnet
X       ...swgate!dlss1             }!dlss2!james
X   NET: 
X      jc at smunews 
END_OF_FILE
if test 972 -ne `wc -c <'Copyright'`; then
    echo shar: \"'Copyright'\" unpacked with wrong size!
fi
# end of 'Copyright'
fi
echo shar: End of shell archive.
exit 0
-- 
=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
|Disclaimer:                      | James Cummings                           |
|  You can't blame me!            |   UUCP:                                  |
|  I'm ignorant!                  |    ..swblat!{texbell!texnet..            |
|+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+|              swgate!dlss1..}!dlss2!james |
|Send flames to:                  |   NET:                                   |
|  sowc at devnull.com               |      jc at smunews                          |
|                                 |                                          |
=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+



More information about the Alt.sources mailing list