clear
##
echo "This demonstration script is intended to let you look quickly at the main
LP Plus status program.  You will still want to add some of your printers and
set up your print environment through the LP Plus administration \"dccadmin\"
script."\\n
  
echo "The script will add a printer called \"lppdemo\", start the LP Plus" 
echo "scheduler \"dccsched\", enable the printer lppdemo \"dccenable\","
echo "send three print jobs to the printer \"dcclp\", and run the LP Plus"
echo "main status program \"dccstat\"."\\n

echo "From within the main status program you can press the \"?\" key for help."
echo "A list of all available LP Plus commands are available from this menu."

echo "Press [ENTER] to continue:\c"
read key
clear

##
##  Add the printer lppdemo (usually done through dccadmin script)
##
echo "\n*********************************************************************"
echo "Adding the LP Plus demonstration printer lppdemo."
echo "(Usually done through the LP Plus administration script \"dccadmin\")"
echo "*********************************************************************\n"
sleep 2
if [ -d $LPHOME/printers/lppdemo ];then
   echo "The LP Plus demonstration printer lppdemo already exists.\n"
else
   $LPHOME/bin/lpadmin -v/tmp -omode=directory -p lppdemo
fi

##
##  Start the LP Plus scheduler.
##
echo "\n*********************************************************************"
echo "Starting the LP Plus scheduler \"dccsched\"."
echo "*********************************************************************\n"
echo "dccsched"
sleep 3
dccsched

##
##  Enable the printer lppdemo.
##
echo "\n*********************************************************************"
echo "Enabling LP Plus printer lppdemo \"dccenable\"."
echo "*********************************************************************\n"
echo "dccenable -d lppdemo"
sleep 3
dccenable -d lppdemo

##
##  Submit the readme LP Plus file as the first demo print request.
## 
echo "\n*********************************************************************"
echo "Sending two print jobs to lppdemo \"dcclp\"."
echo "*********************************************************************\n"
echo "\ndcclp -dlppdemo $LPHOME/shells/demorpt"
dcclp -dlppdemo -H hold -o nop -n 10 -t "ViewMe" $LPHOME/shells/demorpt
sleep 2
echo "\ndcclp -dlppdemo $LPHOME/model/lpstandard"
dcclp -dlppdemo -o nop $LPHOME/model/lpstandard

##
##  Start the LP Plus main status screen.
##
echo "\n*********************************************************************"
echo "Executing the dccstat status program \"dccstat\"."
echo "*********************************************************************\n"
echo "Press [ENTER] to run the LP Plus main status program:\c"
read key
echo "\ndccstat"
sleep 2
dccstat

##
##  
##

clear
echo "What you just looked at was the LP Plus main status program.\n"
echo "You will want to add your printers and set up your print"
echo "environment through the LP Plus administration script"
echo "\"dccadmin\" to take full advantage of the evaluation."
