#!/usr/local/bin/tops -s /usr/local/tops/sys -u /opt/mytops/usr/

#  File: root_pppoe  October 2006

#  Start server for pppoe.

   getuid 0<> IF " root_pppoe: must be run by root" . nl exit THEN
   ntrace
   "pppoe-start" missing IF "web.v" source THEN
   "" "SERVER_ALLOW" "clients" bank
   "" "CLIENT_ALLOW" "clients" bank
   IPloop ALLOW
   IPloop "pppoe-start" "PORT" yank DSERVER
   HALT

#-----------------------------------------------------------------------

The following can be copied to a script file that can be placed in 
/etc/ppp and run by root when the machine is shut down.  It will 
close the tops pppoe server that was started by the script above.  
By exiting cleanly, the server log file in /tmp will be deleted.

#!/usr/local/bin/tops -s /usr/local/tops/sys -u /opt/mytops/usr/

#  File: pppoe_close  October 2006

#  Shut down the tops pppoe server, started by root_pppoe.

   getuid 0<> IF " pppoe_close: must be run by root" . nl exit THEN

   pppoe-stop drop nl

   "pppoe-start" "PORT_ON" localrun
   IF IPloop "pppoe-start" "PORT" yank CLIENT "S" book S -1 >
      IF "5 'exit' ALARM" S remoterun
         " pppoe_close: shutting down the tops pppoe server" . nl
      THEN
   THEN
