xref: /dflybsd-src/usr.sbin/cron/doc/INSTALL (revision 86d7f5d305c6adaa56ff4582ece9859d73106103)
186d7f5d3SJohn Marino/* Copyright 1993,1994 by Paul Vixie
286d7f5d3SJohn Marino * All rights reserved
386d7f5d3SJohn Marino *
486d7f5d3SJohn Marino * Distribute freely, except: don't remove my name from the source or
586d7f5d3SJohn Marino * documentation (don't take credit for my work), mark your changes (don't
686d7f5d3SJohn Marino * get me blamed for your possible bugs), don't alter or remove this
786d7f5d3SJohn Marino * notice.  May be sold if buildable source is provided to buyer.  No
886d7f5d3SJohn Marino * warrantee of any kind, express or implied, is included with this
986d7f5d3SJohn Marino * software; use at your own risk, responsibility for damages (if any) to
1086d7f5d3SJohn Marino * anyone resulting from the use of this software rests entirely with the
1186d7f5d3SJohn Marino * user.
1286d7f5d3SJohn Marino *
1386d7f5d3SJohn Marino * Send bug reports, bug fixes, enhancements, requests, flames, etc., and
1486d7f5d3SJohn Marino * I'll try to keep a version up to date.  I can be reached as follows:
1586d7f5d3SJohn Marino * Paul Vixie          <paul@vix.com>          uunet!decwrl!vixie!paul
1686d7f5d3SJohn Marino */
1786d7f5d3SJohn Marino
1886d7f5d3SJohn Marino$FreeBSD: src/usr.sbin/cron/doc/INSTALL,v 1.4 1999/08/28 01:15:53 peter Exp $
1986d7f5d3SJohn Marino$DragonFly: src/usr.sbin/cron/doc/INSTALL,v 1.2 2003/06/17 04:29:53 dillon Exp $
2086d7f5d3SJohn Marino
2186d7f5d3SJohn MarinoRead the comments at the top of the Makefile, then edit the area marked
2286d7f5d3SJohn Marino'configurable stuff'.
2386d7f5d3SJohn Marino
2486d7f5d3SJohn MarinoEdit config.h.  The stuff I expect you to change is down a bit from the
2586d7f5d3SJohn Marinotop of the file, but it's clearly marked.  Also look at pathnames.h.
2686d7f5d3SJohn Marino
2786d7f5d3SJohn MarinoYou don't have to create the /var/cron or /var/cron/tabs directories, since
2886d7f5d3SJohn Marinoboth the daemon and the `crontab' program will do this the first time they
2986d7f5d3SJohn Marinorun if they don't exist.  You do need to have a /var, though -- just "mkdir
3086d7f5d3SJohn Marino/var" if you don't have one, or you can "mkdir /usr/var; ln -s /usr/var /var"
3186d7f5d3SJohn Marinoif you expect your /var to have a lot of stuff in it.
3286d7f5d3SJohn Marino
3386d7f5d3SJohn MarinoYou will also need /usr/local/etc and /usr/local/bin directories unless you
3486d7f5d3SJohn Marinochange the Makefile.  These will have to be created by hand, but if you are
3586d7f5d3SJohn Marinoa long-time Usenet user you probably have them already.  /usr/local/man is
3686d7f5d3SJohn Marinowhere I keep my man pages, but I have the source for `man' and you probably
3786d7f5d3SJohn Marinodo not.  Therefore you may have to put the man pages into /usr/man/manl,
3886d7f5d3SJohn Marinowhich will be hard since there will be name collisions.  (Note that the man
3986d7f5d3SJohn Marinocommand was originally written by Bill Joy before he left Berkeley, and it
4086d7f5d3SJohn Marinocontains no AT&T code, so it is in UUNET's archive of freely-distributable
4186d7f5d3SJohn MarinoBSD code.)
4286d7f5d3SJohn Marino
4386d7f5d3SJohn MarinoLINUX note: /usr/include/paths.h on some linux systems shows _PATH_SENDMAIL
4486d7f5d3SJohn Marino	to be /usr/bin/sendmail even though sendmail is installed in /usr/lib.
4586d7f5d3SJohn Marino	you should check this out.
4686d7f5d3SJohn Marino
4786d7f5d3SJohn Marinosay:
4886d7f5d3SJohn Marino	make all
4986d7f5d3SJohn Marino
5086d7f5d3SJohn Marinosu and say:
5186d7f5d3SJohn Marino	make install
5286d7f5d3SJohn Marino
5386d7f5d3SJohn MarinoNote that if I can get you to "su and say" something just by asking, you have
5486d7f5d3SJohn Marinoa very serious security problem on your system and you should look into it.
5586d7f5d3SJohn Marino
5686d7f5d3SJohn MarinoEdit your /usr/lib/crontab file into little pieces -- see the CONVERSION file
5786d7f5d3SJohn Marinofor help on this.
5886d7f5d3SJohn Marino
5986d7f5d3SJohn MarinoUse the `crontab' command to install all the little pieces you just created.
6086d7f5d3SJohn MarinoSome examples (see below before trying any of these!)
6186d7f5d3SJohn Marino
6286d7f5d3SJohn Marino	crontab -u uucp -r /usr/lib/uucp/crontab.src
6386d7f5d3SJohn Marino	crontab -u news -r /usr/lib/news/crontab.src
6486d7f5d3SJohn Marino	crontab -u root -r /usr/adm/crontab.src
6586d7f5d3SJohn Marino
6686d7f5d3SJohn MarinoNotes on above examples: (1) the .src files are copied at the time the
6786d7f5d3SJohn Marinocommand is issued; changing the source files later will have no effect until
6886d7f5d3SJohn Marinothey are reinstalled with another `crontab -r' command.  (2) The crontab
6986d7f5d3SJohn Marinocommand will affect the crontab of the person using the command unless `-u
7086d7f5d3SJohn MarinoUSER' is given; `-u' only works for root.  When using most `su' commands
7186d7f5d3SJohn Marinounder most BSD's, `crontab' will still think of you as yourself even though
7286d7f5d3SJohn Marinoyou may think of yourself as root -- so use `-u' liberally.  (3) the `-r'
7386d7f5d3SJohn Marinooption stands for `replace'; check the man page for crontab(1) for other
7486d7f5d3SJohn Marinopossibilities.
7586d7f5d3SJohn Marino
7686d7f5d3SJohn MarinoKill your existing cron daemon -- do `ps aux' and look for /etc/cron.
7786d7f5d3SJohn Marino
7886d7f5d3SJohn MarinoEdit your /etc/rc or /etc/rc.local, looking for the line that starts up
7986d7f5d3SJohn Marino/etc/cron.  Comment it out and add a line to start the new cron daemon
8086d7f5d3SJohn Marino-- usually /usr/local/etc/cron, unless you changed it in the Makefile.
8186d7f5d3SJohn Marino
8286d7f5d3SJohn MarinoStart up this cron daemon yourself as root.  Just type /usr/local/etc/cron
8386d7f5d3SJohn Marino(or whatever); no '&' is needed since the daemon forks itself and the
8486d7f5d3SJohn Marinoprocess you executed returns immediately.
8586d7f5d3SJohn Marino
8686d7f5d3SJohn MarinoATT notes: for those people unfortunate enough to be stuck on a AT&T UNIX,
8786d7f5d3SJohn Marinoyou will need the public-domain "libndir", found in the B News source and in
8886d7f5d3SJohn Marinoany comp.sources.unix archive.  You will also need to hack the code some.
89