BSD 4_2 release
[unix-history] / usr / src / new / new / news / config / install.v7
: '@(#)install.v7 2.6 3/3/83'
if test "$#" != 4
then
echo "usage: $0 spooldir libdir nuser ngroup"
exit 1
fi
SPOOLDIR=$1
LIBDIR=$2
NEWSUSR=$3
NEWSGRP=$4
: Get name of local system
SYSNAME=`uuname -l`
if test "$SYSNAME" = ""
then
echo "$0: Cannot get system name"
exit 1
fi
: Ensure SPOOLDIR exists
if test ! -d $SPOOLDIR
then
mkdir $SPOOLDIR
fi
chmod 777 $SPOOLDIR
chown $NEWSUSR $SPOOLDIR
chgrp $NEWSGRP $SPOOLDIR
: Ensure LIBDIR exists
if test ! -d $LIBDIR
then
mkdir $LIBDIR
fi
chmod 777 $LIBDIR
chown $NEWSUSR $LIBDIR
chgrp $NEWSGRP $LIBDIR
: Ensure certain files in LIBDIR exist
touch $LIBDIR/history $LIBDIR/active $LIBDIR/log $LIBDIR/users
chmod 666 $LIBDIR/users
: If no sys file, make one.
if test ! -f $LIBDIR/sys
then
echo making a $LIBDIR/sys file to link you to oopsvax
echo you must change oopsvax to your news feed
cat > $LIBDIR/sys << EOF
$SYSNAME:net.all,fa.all,to.$SYSNAME::
oopsvax:net.all,fa.all,to.oopsvax::
EOF
fi
: If no seq file, make one.
if test ! -f $LIBDIR/seq
then
echo '100' >$LIBDIR/seq
fi
: If no .ngfile, make one.
if test ! -f $LIBDIR/ngfile
then
cat > $LIBDIR/ngfile << EOF
all
!fa.all
EOF
fi
chown $NEWSUSR $LIBDIR/[a-z]*
chgrp $NEWSGRP $LIBDIR/[a-z]*
echo reminder: uux must permit rnews if running over uucp