User`s guide

Protogate Freeway Security Features User’s Guide (SFUG) Chapter 3. Logs
(generally once per day) by the cron daemon.
Figure 3-2 shows lines which could be added to a Freeway’s
/usr/local/freeway/boot.src/rc.startsra file to rotate and maintain the syslog logs:
Figure 3-2. Rotate the Log Files
echo "# logfilename mode count size when flags" > /etc/newsyslog.conf
echo "${LOG_DIR}/all.log 600 31
*
@T05 WZ" >> /etc/newsyslog.conf
echo "${LOG_DIR}/cron 600 31
*
@T05 WZ" >> /etc/newsyslog.conf
echo "SHELL=/bin/sh" > /etc/crontab
echo "PATH=/etc:/bin:/sbin:/usr/bin:/usr/sbin" >> /etc/crontab
echo "HOME=/var/log" >> /etc/crontab
echo "B_FWY_SERVERNAME=${B_FWY_SERVERNAME}" >> /etc/crontab
echo "MAILTO=\"\"" >> /etc/crontab
echo "TZ=\"\"" >> /etc/crontab
echo "#" >> /etc/crontab
echo "#minute hour mday month wday who command" >> /etc/crontab
echo "#" >> /etc/crontab
echo "0
* * * *
root newsyslog" >> /etc/crontab
if [ -x /usr/sbin/cron ]; then
/usr/sbin/cron
fi
Those lines create two new files, /etc/newsyslog.conf and /etc/crontab, to cause the cron daemon to run
the newsyslog utility every night at midnight. As configured there, newsyslog would compress the existing
/var/log/all.log file and move it to a new name (/var/log/all.log.0.gz), then create a new, initially
empty, /var/log/all.logfile to be filled with new syslog entries. It will preserve up to 31 previous copies of
all.log. (from all.log.0.gz to all.log.30.gz) and will delete copies older than that.
Another newsyslog configuration example is in
Section 6.8. More information about rotating the logs and about
configuring newsyslog is available by logging into a Freeway and typing the commands man newsyslog, man
newsyslog.conf, man cron, and man 5 crontab.
Protogate DC-908-3004A 13