#!/bin/rc
# svcadd SERVICENAME DIALSTRING
# adds information to the /tmp/grid files for an added service
# does NOT add the service itself!
# set variables to args or prompt user if missing
switch($2){
case ''
echo this script simply adds info to /tmp/grid and is not usually run
interactively
echo enter servicename to write
SERVICENAME=`{read}
echo enter dialstring of service
DIALSTRING=`{read}
case *
SERVICENAME=$1
DIALSTRING=$2
}
echo Adding service information to /tmp/grid
echo $DIALSTRING >/tmp/grid/svcin/$SERVICENAME
#echo $SERVICENAME >/tmp/grid/svcin/$DIALSTRING
echo $SERVICENAME $DIALSTRING >>/tmp/grid/info/svcinbucket
echo `{date} svcadd $SERVICENAME $DIALSTRING >>/tmp/grid/log/log
# this script part of the /g/toolkit licensed under the MIT license but be cool
# keep the code open, share your scripts and config files