Method of automatic startup and exit upon power on
(1) Auto startup and auto stop of each daemon on HULFT
You can use a script file to automatically start each HULFT daemon when the operating system is rebooted.
Similarly, you can use a script file to automatically stop each HULFT daemon while the operating system is stopped.
The settings for auto startup and auto stop differ depending on the operating system in use. Refer to the relevant guide book for details.
The following describes how to set up auto startup and auto stop for RedHat Enterprise Linux 7 as an example.
The following tasks must be carried out by a user with superuser (root) permissions.
Create a script file as below, and save it as "/usr/local/bin/hulft".
Change the permissions of the script file to 755.
#!/bin/bash HULEXEP=/HULFT execution module storage directory HULPATH=/HULFT environment settings file storage directory PATH=/HULFT execution module storage directory:$PATH export HULEXEP export HULPATH export PATH if [ "$1" = "start" ]; then if [ ! -f /var/lock/subsys/hulft ]; then hulsndd hulrcvd hulobsd touch /var/lock/subsys/hulft fi elif [ "$1" = "stop" ]; then if [ -f /var/lock/subsys/hulft ]; then utlkillsnd utlkillrcv utlkillobs rm -f /var/lock/subsys/hulft fi fi exit 0
3. Create the service file for the system management daemon.
Create the service file as shown below. In this case, in the final line of the file, specify the run level that you checked in 2. .
Save the created service file as "/etc/systemd/system/hulft.service" and change the permissions to 755.
[Unit] Description=hulft auto restart After=network.target network-online.target [Service] ExecStart=/usr/local/bin/hulft start ExecStop=/usr/local/bin/hulft stop Type=forking [Install] WantedBy=Run level
4. Enable the auto startup of each daemon on HULFT.
Run the following commands to enable the auto startup of each daemon on HULFT.
# systemctl daemon-reload # systemctl enable hulft
(2) Auto startup of the Receive Ready Notification command (issuance of the Resend Request command)
Add the following line to the script file that you created in 1. of (1) Auto startup and auto stop of each daemon on HULFT when the Receive Ready Notification command of HULFT is automatically started at the startup of the operating system.
utlrecv -a
[Example]
#!/bin/bash HULEXEP=/HULFT execution module storage directory : Omitted : hulobsd utlrecv -a <- Add this line touch /var/lock/subsys/hulft : Omitted :
Refer to Operation Manual for details about the Receive Ready Notification command.
When there are a number of host names being registered, it takes time to end the command.