# @(#) mksite 3.0 30mar94 Morgan_Davis @(#)
#
# mksite -- adds a new site for networking      
#

    echo -n "Type of site for networking? (P)roLine or (U)nix:  "
    read pro
    if "$pro" = "p" or "$pro" = "P" then
        set pro="pro-"
    else
        set pro=""
    endif
    echo -n "Name of site to add: $pro"
    read site

if "$pro" != "" then
    set sitename="pro-$site" sitedir="pro.$site"
else
    set sitename=$site sitedir=$site
endif

echo -n "What's the password for $sitename? "
read pw
echo -n "Appending '$sitename;$pw' to \$/etc/idfile..."
echo "$sitename;$pw" >>$/etc/idfile
echo "done"
echo -n "Will $host be storing traffic for $sitename? (y/n) "
read pw
if "$pw" = "y" or "$pw" = "Y" then
    if ! -f $/mdss/$sitedir then
        echo -n "Creating $/mdss/$sitedir..."
        mkdir $/mdss/$sitedir
        echo "done"
    endif
endif
echo -n "Will $host be polling $sitename? (y/n) "
read pw
if "$pw" = "y" or "$pw" = "Y" then
    echo -n "Add an entry in L.sys for $sitename now.  Press RETURN "
    read pw
    $editor $/etc/L.sys
else
    if -f $/mdss/$sitedir then
        setfile -a I $/mdss/$sitedir
        echo "FYI: $/mdss/$sitedir is invisible to prevent scanning/polling."
    else
        echo "FYI: mail for $sitedir will not be stored here on $host."
    endif
endif
echo "Update your map file now to show a connection to $sitename."
echo "Send the updated map to mapcoord@pro-sol.cts.com ASAP."
unset sitename sitedir pro pw
