Here is the procedure to create an configserver service and make it auto-start on boot in RHEL or CentOS
1. Create the service for confserv (confserv.service) (Name it as per your environment standard).
# vi /etc/systemd/system/confserv.service
2. Hit "Insert" and paste the below content in to the confserv.service file.
------------------------------------------------------------------------------------
[unit]
Description=Script to start the confserv
[Service]
User=genesys
Type=simple
WorkingDirectory=/opt/apps/gcti/confserv
ExecStart=/bin/bash /opt/apps/gcti/confserv/run.sh
Requires=lca.service flexlm.service
After=lca.service flexlm.service
[Install]
WantedBy=default.target
------------------------------------------------------------------------------------
Where:
User - This will be the user using which the service will be started. Provide the username which is authorized for Genesys applications.
WorkingDirectory - the actual directory where your configserver is installed.
ExecStart - The application executable path. Here a prefix of /bin/bash is required because the executable is a bash script file.
The "Requires" and "After" definies dependancies to start confserv.service file on boot. The above service file will execute the /opt/apps/gcti/confserv/run.sh command only after lca.service and flexlm.service has started. Assuming lca.service and flexlm.service is already created the same way and available in /etc/systemd/system/. If you do not want to add a dependancies to confserv.service then you may exclude the "Requires" and "After" lines.
Note: If you have any environment variable dependancies, then please add one more line as below
Environment = "<variable>=<value>"
Example: Environment = "NLS_LANG = en_US.UTF8"
3. Hit ESC key followed by ":wq" to write and quit the confserv.service file.
4. Provide execute permission to confserv.service file.
# chmod +x confserv.service
5. Now run the below command to reload confserv.service file so the modifications are applied. You will have to run the below command every time you modify any .service file.
# systemctl daemon-reload
6. Enable the confserv.service to run on system bootup.
# systemctl enable confserv.service
7. Start the service
# systemctl start confserv.service
8. Finally reboot the host and check if the service is automatically running on boot.
# systemctl reboot
------------------------------
Vinod Balan
Reporting & Analytics
Genesys - Employees
------------------------------
Original Message:
Sent: 08-10-2019 16:12
From: Mohammed Anees
Subject: How to autostrart configserver in linux after server reboot
Hello All
In Cent OS 7.5, how to make config server to start automatically after server reboot.
#PlatformAdministration
------------------------------
Regards
Mohammed Anees
------------------------------