ITEM: J9506L

Script to restart Netware print server



Question:
We are running Netware for AIX and would like to automate the process 
of restarting pserver and rprinter. Instead of restarting using sconsole, 
is there any way to do this with a shell script?  

Response:

The pserver and rprinter processes can be started from a script as follows: 
/usr/lpp/netware/bin/pserver -s \ -u \ -p & 
/usr/lpp/netware/bin/rprinter & 

where: \ = the file server name.  
       \ = the print server name. 

The following shell script will stop and restart rprinter and pserver:

\#!/bin/bsh
ps -A | grep rprinter 2>&1 > /dev/null 
if [ "$?" = 0 ]
then     
 kill -9 `cat  /etc/netware/rprinter.pid `
fi

ps -A | grep pserver 2>&1 > /dev/null 
if [ "$?" = 0 ]
then     
 kill -9 `cat  /etc/netware/pserver.pid `
fi

\# Note: In this case the fileserver name is nw6000
\#               and the print server name is nwpserv
/usr/lpp/netware/bin/pserver -s nw6000 -u nwpserv -p & 
/usr/lpp/netware/bin/rprinter & 


Support Line: Script to restart Netware print server ITEM: J9506L
Dated: June 1994 Category: N/A
This HTML file was generated 99/06/24~13:30:43
Comments or suggestions? Contact us