2.4.1 Starting and terminating the JP1/FTP daemon
You must start the JP1/FTP daemon in order to use JP1/FTP.
- Organization of this subsection
(1) Starting the JP1/FTP daemon
To start the JP1/FTP daemon:
-
As a superuser, execute the ftsstart command.
The JP1/FTP daemon's message is output to the system log file and to the terminal where the command was entered.
For details about the ftsstart command, see ftsstart - starts the JP1/FTP daemon in 6. Commands.
To customize the startup procedure (for example, to add environment variable settings) in an RHEL 7, CentOS 7, Oracle Linux 7, SUSE Linux 12, or SUSE Linux 15 environment, replace /etc/opt/jp1_fts/jp1ftpd.startup with a shell that has been customized by using /etc/opt/jp1_fts/jp1ftpd.startup.model.
- Automatic startup method (in Linux)
-
The JP1/FTP daemon is set to start automatically during system startup. If you want to customize the startup procedure, for example, to add environment variable settings, replace /etc/opt/jp1_fts/jp1ftpd.startup with a shell that has been customized by using /etc/opt/jp1_fts/jp1ftpd.startup.model.
To prevent the JP1/FTP daemon from starting up automatically on system startup, disable the service using systemctl command.
# systemctl disable jp1_ftpd.service
When the JP1/FTP daemon is linked with another product such as JP1/Base, if you want the service of the JP1/FTP daemon to start after another product, set the automatic startup order by changing the service file according to the following procedure.
- (1) Copy the service file.
# cp -p /usr/lib/systemd/system/jp1_ftpd.service /etc/systemd/system/.
- (2) Modify the copy of the service file (/etc/systemd/system/jp1_ftpd.service).
-
Example: If you want the service to start after JP1/Base, add the service name of JP1/Base (jp1_base.service) to the service file as follows.
[Unit] After=AAA.target BBB.target CCC.service jp1_base.service
- (3) Disable the service.
# systemctl disable jp1_ftpd.service
- (4) Enable the service.
# systemctl enable jp1_ftpd.service
Note: If you delete this product, you will need to delete the copy of the service file.
Do not directly execute /etc/opt/jp1_fts/jp1ftpd.startup. If you directly execute it, the OS cannot correctly recognize the state of the service, and the JP1/FTP daemon might not stop automatically when the OS stops. In addition, a problem might occur the next time the JP1/FTP daemon starts, or after the JP1/FTP daemon starts.
- Automatic startup method (in AIX)
-
To have the JP1/FTP daemon start automatically during system startup, you must specify the settings described below. These settings take effect the next time the system is started.
- 1. Creating the start command
-
The JP1/FTP daemon is set to start automatically during system startup. If you want to customize the startup procedure, for example, to add environment variable settings, replace /etc/opt/jp1_fts/startup with a shell that has been customized by using /etc/opt/jp1_fts/startup.model. If you want to specify settings so that the JP1/FTP daemon does not start automatically, use a program (such as a text editor) to open /etc/opt/jp1_fts/startup, make the lines below into comments (by adding ":#"), and then save the file.
[Before change]
/opt/jp1_fts/bin/jftsd 1>/var/opt/jp1_fts/sys/jftsd.log 2>&1
[After change]
: # /opt/jp1_fts/bin/jftsd 1>/var/opt/jp1_fts/sys/jftsd.log 2>&1
If you do not want the JP1/FTP daemon to start automatically, the settings in step 2 are not required.
- 2. Specifying the automatic startup setting
-
Use the mkitab command to specify the automatic startup setting:
# mkitab "jp1_fts:2:wait:/etc/opt/jp1_fts/startup"
If you use JP1-series products, you must first set JP1/Base and then set the other JP1-series products sequentially so that the automatic startup sequence is set correctly. If you use JP1/IM and JP1/AJS3, register the JP1/FTP start command after them.
For example, to have JP1/Base, JP1/IM, JP1/AJS3, and JP1/FTP start automatically in this order, execute the following commands:
# mkitab -i hntr2mon "jp1base:2:wait:/etc/opt/jp1base/jbs_start" # mkitab -i jp1base "jp1cons:2:wait:/etc/opt/jp1cons/jco_start" # mkitab -i jp1cons "jp1ajs2:2:wait:/etc/opt/jp1ajs2/jajs_start" # mkitab -i jp1ajs2 "jp1_fts:2:wait:/etc/opt/jp1_fts/startup"
After you have specified the settings, use the lsitab command to check the settings.
Execute the following command:
# lsitab -a
- Example of output
init:2:initdefault: brc::sysinit:/sbin/rc.boot 3 >/dev/console 2>&1 # Phase 3 of system boot : hntr2mon:2:once:/opt/hitachi/HNTRLib2/etc/D002start jp1base:2:wait:/etc/opt/jp1base/jbs_start jp1cons:2:wait:/etc/opt/jp1cons/jco_start jp1ajs2:2:wait:/etc/opt/jp1ajs2/jajs_start jp1_fts:2:wait:/etc/opt/jp1_fts/startup
(2) Terminating the JP1/FTP daemon
Once the JP1/FTP daemon has terminated, no more transmission requests will be accepted.
-
As a superuser, execute the ftsstop command.
The JP1/FTP daemon's message is output to the system log file and to the terminal where the command was entered.
For details about the ftsstop command, see ftsstop - terminates the JP1/FTP daemon in 6. Commands.
- Automatic termination method (in Linux)
-
Once it has been installed, the JP1/FTP daemon is set to terminate automatically during system termination. If you want to customize the termination procedure, replace
/etc/opt/jp1_fts/jp1ftpd.stop with a shell that has been created using /etc/opt/jp1_fts/jp1ftpd.stop.model. You cannot change the settings so that the JP1/FTP daemon does not stop automatically. If you do change the settings so that the JP1/FTP daemon does not stop automatically, the JP1/FTP daemon cannot be stopped by using the ftsstop command either. Do not directly execute /etc/opt/jp1_fts/jp1ftpd.stop. If you directly execute it, the OS cannot correctly recognize the state of the service.
- Automatic termination method (in AIX)
-
To have the JP1/FTP daemon terminate automatically during system termination, add the following settings to /etc/rc.shutdown:
- Example
if [ -x /etc/opt/jp1_fts/stop ] then /etc/opt/jp1_fts/stop fi
If there is no /etc/rc.shutdown file, you must create it. In such a case, set the attributes of the /etc/rc.shutdown file as follows:
chmod 550 /etc/rc.shutdown chown root /etc/rc.shutdown chgrp shutdown /etc/rc.shutdown
If you use JP1-series products, you must set this termination processing so that it executes before the termination processing for JP1/Base and JP1/AJS3.
If you want to terminate programs in a different manner from what is shown above, replace /etc/opt/jp1_fts/stop with a shell that has been created using /etc/opt/jp1_fts/stop.model.