#!/bin/tcsh
#
# DAILY ADMINISTRATION SCRIPT FOR SLIP
#
# - truncate log files
# - reset SLIP line 1

cd /etc/slip
set path = (. /bin /etc /usr/bin /usr/local/bin /usr/share/bin)
umask 022

date

# truncate log files
#
#

foreach i ( log0 log1 log2 )
    if -f $i then
        tail -100 $i >$i.tmp
        cat $i.tmp >$i
        rm -f $i.tmp
    endif
end

# EXAMPLE OF AUTOMATICALLY DISCONNECTING AND RECONNECTING ONCE A DAY
# TO ENSURE A LINE IS CLEAN (i.e. you haven't been knocked back into a
# shell or something).   UNCOMMENT IF YOU WANT TO DO THAT, MODIFYING
# THE SCRIPT IDENTIFIER (0, 1, 2) AS APPROPRIATE.
#
# if line 1 is enabled, temporarily disable and
# reenable to reset it.


#if ! -f disable1 then
#    touch disable1
#    sleep 60
#    rm -f disable1
#    sleep 60
#endif

