Files
OpenVPN-Monitoring-Simple/DOCS/General/openrc/INSTALL.md
2026-01-28 22:37:47 +03:00

1.3 KiB

OpenRC Service Installation Guide

This guide explains how to install and enable the ovpmon-api and ovpmon-gatherer services on an Alpine Linux (or other OpenRC-based) system.

Prerequisites

  • Paths: The scripts assume the application is installed at /opt/ovpmon.
  • Virtualenv: A python virtual environment should exist at /opt/ovpmon/venv.

If your paths differ, you can edit the scripts directly or create configuration files in /etc/conf.d/.

Installation Steps

  1. Copy the scripts to /etc/init.d/:

    cp ovpmon-api /etc/init.d/
    cp ovpmon-gatherer /etc/init.d/
    
  2. Make them executable:

    chmod 755 /etc/init.d/ovpmon-api
    chmod 755 /etc/init.d/ovpmon-gatherer
    
  3. Add to default runlevel (to start on boot):

    rc-update add ovpmon-api default
    rc-update add ovpmon-gatherer default
    
  4. Start the services:

    rc-service ovpmon-api start
    rc-service ovpmon-gatherer start
    

Configuration (Optional)

You can override default variables without editing the script by creating files in /etc/conf.d/.

Example /etc/conf.d/ovpmon-api:

# Override installation directory
directory="/var/www/ovpmon/APP"

# Override command arguments
command_args="/var/www/ovpmon/APP/openvpn_api_v3.py --debug"