Tech Tips

Home Products Downloads Support Sales Company


   License Manager
   Terminal Emulation
   Tech Tips


 Product Support


How can I get the system to start the Workstation Group License Manager automatically whenever my system reboots?


The Workstation Group includes a shell script to start the License Manager with the installation software. This script is named 'twglm' and it resides in the directory where you installed the License Manager software. The default location for this is "/usr/local/twglm", so all examples below will use this path. Change the examples to correspond to the actual location of the License Manager files. To start the TWG License Manager daemon at system reboot, you need to place the command "/usr/local/twglm/twglm" in an appropriate system startup script. The script where this command is placed depends on the variety of UNIX operating system running on your machine. Examples for BSD-derivatives, AIX, and System V-based (Solaris, SGI, HP/UX) systems follow.

BSD-derived UNIX variants house their startup scripts in /etc/rc, and /etc/rc.local. This would apply to SunOS systems and possibly others. Add the License Manager startup to the end of one of these scripts as follows:

if [ -f  /usr/local/twglm/twglm  ]; then
  echo -n ' twglm starting'; 
  /usr/local/twglm/twglm > /dev/null;

AIX systems are somewhat similar to the BSD systems, in that there are a number of shell scripts in the /etc directory which are executed at system boot time. All of these scripts are started by entries in the /etc/inittab control file. You may start the License Manager by adding the command "/usr/local/twglm/twglm" to an appropriate system startup script of your choosing. A good script candidate is /etc/rc.tcpip. If you wish to use this script, add the startup command to the end of the script. If you wish to add the License Manager startup command to /etc/inittab, use the mkitab command, as follows:

mkitab twglm:2:once:/usr/local/twglm/twglm

System-V UNIX variants have a more complex boot mechanism involving "run-levels". This applies to Solaris, SGI, and HP/UX systems. The License Manager should be started when entering run-level 3, stopped on entering run-level 2. This can be done with the steps below. Please don't follow these steps blindly, HP/UX in particular uses the names /sbin/init.d and /sbin/rc2.d/rc3.d. Some systems may use "soft" links instead of "hard" links in step 2. Check your system closely before doing this! On HP/UX refer to man rc.

1) Add a script to /etc/init.d named "twgctl", containing the following:

#  twgctl - Script to start the Workstation Group 
#           License Manager.
#  Change the following directory to point to the 
#  actual location.

set `who -r`
case $state in

[ -f $twgdir/twglm ] && $twgdir/twglm
[ -f $twgdir/twgutil ] && $twgdir/twgutil -k
echo "Usage: /etc/init.d/twgctl { start | stop }"

2) Create links to activate startup and shutdown

# cd /etc/init.d
# ln twgctl /etc/rc3.d/S25twgctl
# ln twgctl /etc/rc2.d/K25twgctl