How to create a systemd service for the UVMS on RHEL9 and other Linux distributions that don't accept the sysv script delivered currently in the product (7.00.21 and inferior).
UVMS 6.x and 7.x
This is the procedure to create a SystemD service for starting UVMS, first of all you need to login as the root user to the server and then follow these steps:
1. Create a SystemD file:
Create a service file for the systemd on your system. This file must have .service extension and be saved under the /lib/systemd/system/ directory.
Then, add the following content (replacing by your UVMS folder path) and update the script filename and location.
You can also change the description of the service and/or replace the user and group that starts the service if needed.
For example, let's call it univiewerMS.service
[Unit]
Description=UniviewerMS Daemon (UVMS)
After=syslog.target network.target
[Service]
Type=forking
WorkingDirectory=/replace_by_your_uvms_folder/app/bin/
ExecStart=/replace_by_your_uvms_folder/app/bin/unistartms
ExecStop=/replace_by_your_uvms_folder/app/bin/unistopms
[Install]
WantedBy=multi-user.target
2. Reload All Services
The system service has been added to your service. Reload the systemctl daemon to read new file. You need to reload this daemon each time after making any changes in .service file.
systemctl daemon-reload
3. Enable and Start New Service
Now enable the service to start on system boot, also start the service using the following commands.
systemctl enable univiewerMS.service
systemctl start univiewerMS.service
4. Verify the New Service
Finally verify the script is up and running as a systemd service.
systemctl status univiewerMS.service
or
service univiewerMS status