1 rick 1.1 # check that local config file has been edited appropriately
2 if ($#LOCAL_CONFIG_SET == 1) then
3 if ($LOCAL_CONFIG_SET =~ "NO") then
4 echo "Error: local configuration file $LOCALINF must be edited"
5 echo " After editing the file appropriately, rerun this script ($0)"
6 exit
7 endif
8 endif
9
10 if ($#SUMS_LOG_BASEDIR != 1) then
11 echo "Error: $SUMS_LOG_BASEDIR undefined in local configuration file $LOCALINF"
12 exit
13 endif
14 if ($#SUMS_MANAGER != 1) then
15 echo "Error: SUMS_MANAGER undefined in local configuration file $LOCALINF"
16 exit
17 endif
18
19 set SUMRM_CONFIG = $SUMS_LOG_BASEDIR/sum_rm.cf
20 if (-e $SUMRM_CONFIG) then
21 echo "A sum_rm.cf configuration file already exists in $SUMS_LOG_BASEDIR"
22 rick 1.1 echo " Edit it at any time to modify the configuration"
23 exit
24 endif
25
26 echo "# configuration file for sum_rm program" >> $SUMRM_CONFIG
27 echo "#" >> $SUMRM_CONFIG
28 echo "# You may edit this file any time, it is read each time sum_rm is run," >> $SUMRM_CONFIG
29 echo "# which will occur at the intervals specified by the SLEEP parameter" >> $SUMRM_CONFIG
30 echo "#" >> $SUMRM_CONFIG
31 echo "# when sum_rm finishes, sleep for n seconds before re-running" >> $SUMRM_CONFIG
32 echo "SLEEP=3600" >> $SUMRM_CONFIG
33 echo "# delete until this many Megabytes are free on the specified SUMS disk" >> $SUMRM_CONFIG
34 echo "# partitions (one entry, numbered 0-n, for each partition" >> $SUMRM_CONFIG
35 echo "MAX_FREE_0=100000" >> $SUMRM_CONFIG
36 echo "# name of the log file (opened at startup; date and pid are appended to this" >> $SUMRM_CONFIG
37 echo "# name); do not change the directory without changing SUMS_LOG_BASEDIR in" >> $SUMRM_CONFIG
38 echo "# the config.local and rebuilding sums" >> $SUMRM_CONFIG
39 echo "LOG=$SUMS_LOG_BASEDIR/sum_rm.log" >> $SUMRM_CONFIG
40 echo "# whom to bother when there's a notable problem" >> $SUMRM_CONFIG
41 echo "MAIL=$SUMS_MANAGER" >> $SUMRM_CONFIG
42 echo "# to prevent sum_rm from doing anything set non-zero (for testing)" >> $SUMRM_CONFIG
43 rick 1.1 echo "NOOP=0" >> $SUMRM_CONFIG
44 echo "# sum_rm can only be enabled for a single user" >> $SUMRM_CONFIG
45 echo "USER=$SUMS_MANAGER" >> $SUMRM_CONFIG
46 echo "# dont run sum_rm between these NORUN hours of the day (0-23)" >> $SUMRM_CONFIG
47 echo "# comment out to ignore or set them both to the same hour" >> $SUMRM_CONFIG
48 echo "# The NORUN_STOP must be >= NORUN_START" >> $SUMRM_CONFIG
49 echo "# dont run when the hour first hits NORUN_START" >> $SUMRM_CONFIG
50 echo "NORUN_START=7" >> $SUMRM_CONFIG
51 echo "# start running again when the hour first hits NORUN_STOP" >> $SUMRM_CONFIG
52 echo "NORUN_STOP=7" >> $SUMRM_CONFIG
53
54 echo "A sum_rm.cf configuration file with default values has been generated"
55 echo " in $SUMS_LOG_BASEDIR"
56 echo "Review and edit the values as appropriate; in particular, if there is"
57 echo " more than one SUMS disk partition, add the appropriate number of"
58 echo " MAX_FREE_n lines and values"
|