StarQuest Technical Documents
How to Add the StarLicense for UNIX Daemon to the Boot Process
Last Update: 14 May 2014
Product: StarLicense for UNIX
Version: 1.x or later
Article ID: SQV00SL003
Abstract
This technical document describes how to add the StarLicense for UNIX daemon to the boot process so that it starts automatically when the operating system starts.
Solution
The runtime control (rc) script for StarLicense, /etc/rc.sqlicd, is automatically created when StarLicense is installed. Use the mkitab command to add an entry to the /etc/inittab file that instructs the operating system to start the StarLicense daemon when the system boots up.
- Log on as root user.
- Execute the command: /usr/sbin/mkitab 'sqlicd:2:once:/etc/rc.sqlicd start'.
- View the contents of the /etc/inittab file to ensure that the entry was added correctly.
Create a symbolic link in /usr/local/etc/rc.d directory that points to the StarLicense daemon startup script.
- Log on as root user.
- Run the command:
For FreeBSD v6.1 and later, you can also use this method:$ ln -s /usr/share/starlicense/sqlicd.sh /usr/local/etc/rc.d
- Log on as root user.
- Run the command:
$ ln -s /usr/share/starlicense/100.sqlicd.sh /usr/local/etc/rc.d
-
Add the following line to /etc/rc.conf to enable `sqlicd'::
sqlicd_enable="YES"
Create symbolic links in the /sbin/rc2.d and /sbin/rc1.d directories pointing to the StarLicense daemon startup and shutdown script.
- Log on as root user.
- Verify that a symbolic link in /sbin/init.d/sqlicd exists and points to /opt/starlicense/sqlicd.sh. If the link does not exist, create it using the following command:
$ ln -s /opt/starlicense/sqlicd.sh /sbin/init.d/sqlicd
-
Create two additional symbolic links using the following commands:
$ ln -s /sbin/init.d/sqlicd /sbin/rc2.d/S99sqlicd
$ ln -s /sbin/init.d/sqlicd /sbin/rc1.d/K99sqlicdThe placement of the S99sqlicd symbolic link in the rc2.d directory instructs the operating system to start the StarLicense daemon, using the linked script, when entering level 2 of the startup process, at a priority of 99.
The placement of the K99sqlicd symbolic link in the rc1.d directory instructs the operating system to kill the StarLicense daemon, using the linked script, when entering level 1 of the shutdown process, at a priority level of 99.
Use the chkconfig command to add the StarLicense daemon to the boot process.
- Log on as root user.
- Verify that the /etc/init.d/sqlicd symbolic link exists and points to /usr/share/starlicense/sqlicd.sh.
- Run the following command to create the necessary links in /etc/rc2.d, etc. (/etc/init.d/rc2.d on SUSE Linux):
$ /sbin/chkconfig --add sqlicd
For Debian Linux, use the update-rc.d to create symbolic links in the /etc/rc2.d, etc directories:
$ update-rc.d sqlicd start 99 2 3 4 5 . stop 99 0 1 6 .
Follow the procedures below to configure the system to automatically run the StarLicense server daemon when the system is started.
- Log on as a user with root access (i.e., use the sudo command).
- Run the commands:
$ cd /Applications/starlicense/macos
$ sudo ./setup_autostartThis will perform the following operations:
- create a directory "sqlicd" in /Library/StartupItems, and
- copy the sqlicd and StartupParameters.plist files to /Library/StartupItems/sqlicd
- Verify that /Library/StartupItems/sqlicd/sqlicd is executable, as shown in the sample command below:
$ sudo chmod +x /Library/StartupItems/sqlicd/sqlicd
- If you installed StarLicense to a location other than /Applications/starlicense, edit /Library/StartupItems/sqlicd/sqlicd and change the STARLICENSE variable.
- If you want to control the automatic startup from /etc/hostconfig, comment out the "sqlicd=-YES-" line in /Library/StartupItems/sqlicd/sqlicd and add the following line to /etc/hostconfig:
SQLICD=-YES-
See /Applications/starlicense/macos/readme-macos.txt for additional information.
Create symbolic links in the /etc/rc2.d and /etc/rc1.d directories pointing to the StarLicense daemon startup and shutdown script.
- Log on as root user.
- Verify that a symbolic link in /etc/init.d/sqlicd exists and points to /opt/starlicense/sqlicd.sh. If the link does not exist, create it using the following command:
$ ln -s /opt/starlicense/sqlicd.sh /etc/init.d/sqlicd
-
Create two additional symbolic links using the following commands:
$ ln -s /etc/init.d/sqlicd /etc/rc2.d/S99sqlicd
$ ln -s /etc/init.d/sqlicd /etc/rc1.d/K99sqlicdThe placement of the S99sqlicd symbolic link in the rc2.d directory instructs the operating system to start the StarLicense daemon, using the linked script, when entering level 2 of the startup process, at a priority of 99.
The placement of the K99sqlicd symbolic link in the rc1.d directory instructs the operating system to kill the StarLicense daemon, using the linked script, when entering level 1 of the shutdown process, at a priority level of 99.
DISCLAIMER
The information in technical documents comes without any warranty or applicability for a specific purpose. The author(s) or distributor(s) will not accept responsibility for any damage incurred directly or indirectly through use of the information contained in these documents. The instructions may need to be modified to be appropriate for the hardware and software that has been installed and configured within a particular organization. The information in technical documents should be considered only as an example and may include information from various sources, including IBM, Microsoft, and other organizations.