How to Start HVR as Service Using Inetd in Linux
Question
How can I start HVR as a service using inetd in Linux?
Environment
HVR 5
Answer
This article explains how to run HVR as a service rather than starting the hvrremotelistener on a remote machine. For the purpose of this article, we will see how the service can be started on tcp port 4343.
Steps
As the
rootuser, or a user withsudoprivilege, edit the file calledinetd.confin the directory/etcto add the following contents:hvr stream tcp nowait root /home/hvr/hvr_home/bin/hvr hvr -r -plogin -EHVR_HOME=/home/hvr/hvr_home -EHVR_CONFIG=/home/hvr/hvr_config -EHVR_TMP=tmpAs the
rootuser, or a user withsudoprivilege, add below line to theservicesfile in the directory/etc.hvr 4343/tcp # hvr service- Server arguments should be option
–ploginfor PAM authentication - Environment variable for
$HVR_HOMEshould be path ofhvr_homeon your machine - Environment variable for
$HVR_CONFIGshould be path ofhvr_configon your machine - Environment variable for
$HVR_TMPcan be anytmplocation on your machine
- Server arguments should be option
Start the service using the command below:
$ /etc/init.d/openbsd-inetd startVerify whether the service is running using the command below:
$ /etc/init.d/openbsd-inetd status
The above setup allows you to start HVR as a service. There is no need to start hvrremotelistener every time. This service is started whenever the system is rebooted.