PingAccess

Managing the PingAccess Linux service

Configure PingAccess to run as a Linux systemv or systemd service, or remove the PingAccess Linux service.

About this task

Configuring PingAccess to run as a Linux systemv or systemd service causes it to start automatically when Linux starts.

To configure multiple instances of PingAccess as Linux services, see the Linux systemv tab.

  • Linux systemv

  • Linux systemd

Configuring PingAccess to run as a Linux systemv service

About this task

The service script will only start if JAVA_HOME and PA_HOME are set and if the script can find the PingAccess license file.

To configure multiple instances of PingAccess on a single host as Linux services, make the following modifications to the script for each service:

  • Use a unique script name for each instance.

  • Use a separate directory structure for each instance in the file system.

  • Configure the following settings in the script file for each instance:

Setting Description

APPNAME

A unique value for each instance.

PA_HOME

The path to the PingAccess instance.

JAVA_HOME

The path to the Java installation folder.

USER

Optional value for the username used to run the service.

To configure PingAccess to run as a Linux systemv service:

Steps

  1. Copy the PingAccess script file from the PA_HOME/sbin/linux/pingaccess directory to the /etc/init.d directory.

  2. Optional: Create a new user to run PingAccess.

  3. Create the /var/run/pingaccess directory.

    Ensure that the user who will run the service has read and write permissions to the folder.

  4. Edit the /etc/init.d/pingaccess script file and set the values of the following variables at the beginning of the script:

    Variable Description

    export JAVA_HOME=

    Specify the Java install folder.

    export PA_HOME=

    Specify the PingAccess install folder.

    export USER= (Optional)

    Specify a username to run the service or leave empty for the default.

  5. To register the service, from the /etc/init.d directory, run:

    chkconfig --add pingaccess
  6. To make the service script executable, run:

    chmod +x pingaccess

Next steps

After registering, you can use the service command to control the PingAccess service. The available commands are:

start

Start the PingAccess service.

stop

Stop the PingAccess service.

restart

Restart the PingAccess service.

status

Show the status of the PingAccess service and the service process identifier (PID).

The service pingaccess status command displays the current status of the running PingAccess service.

Configuring PingAccess to run as a Linux systemd service

About this task

The service script will only start if JAVA_HOME and PA_HOME are set and if the script can find the PingAccess license file.

To configure PingAccess to run as a Linux systemd service:

Steps

  1. Copy the configuration file from the PA_HOME/sbin/linux/pingaccess.service directory to the /etc/systemd/system/pingaccess.service directory.

  2. In the pingaccess.service file, replace the following variables:

    • Replace ${PA_HOME} with the path to the PingAccess instance.

    • Replace ${PA_USER} with the username used to run the service.

    • Replace ${PA_JAVA_HOME} with the path to the Java installation folder.

  3. To allow read-write activity on the service, run:

    chmod 644 /etc/systemd/system/pingaccess.service
  4. To load the systemd service, run:

    systemctl daemon-reload
  5. To enable the service, run:

    systemctl enable pingaccess.service
  6. To start the service, run:

    systemctl start pingaccess.service

Removing the PingAccess Linux service

About this task

You must run the following commands as the root user.

To remove the PingAccess service from a Linux system:

Steps

  1. To stop the service, run the /etc/init.d/pingaccess stop command.

  2. Run the chkconfig --delete pingaccess command.

  3. Optional: Delete the /etc/init.d/pingaccess script.