AVREG PROFILES

AVReg profiles are a setup system that allows you to divide AVReg common
configuration by groups of cameras and parallel avregd daemons or even
independent AVReg systems.

Technically, profiles are implemented by additional configuration text
files into the /etc/avreg/profiles/ directory. The syntax of such files
matches the syntax of the main configuration file avreg.conf.

Example of profile’s config file content:

    # a list of camera numbers for this group
    devlist = 06-10

       # httpd port for video streaming and avregd controls
       http-port = 875
       rtsp-port = 8555
    }

    avreg-site {
       avregd-httpd = 'http://$_SERVER[SERVER_NAME]:875'
    }


Valid profile’s conf names

Valid name GNU FIND(1) regex: [A-Za-z0-9][A-Za-z0-9_\.:\-]+

Examples:

-   valid:
    -   cams_01-05
    -   cams-01..05
    -   p1
    -   group1
-   invalid (ignored):
    -   01-05
    -   -cams_1
    -   cams_01-05~


Actions with profiles

    $ sudo avreg-service start|stop|restart|reload|status <PROFILE-NAME>


Update profiles

Make all

We recommend using a special profile generator utility:
avreg-profile-gen:

    $ avreg-profile-gen --help
    Usage: avreg-profiles-gen [options] [empty-temp-dir]
    where options:
      -h           - print this help
      -c NBR       - max numbers of cameras, default 100
      -g NUM       - max cameras per profile (process avregd), default 10
      -p HTTP_PORT - base avregd http server port, default 874
      -r RTSP_PORT - base avregd rtsp server port, default 8574

Example of creating 5 profiles for a 50 cameras AVReg configuration:

    mkdir /tmp/avreg-profiles-tmp.d
    avreg-profiles-gen -c 50 /tmp/avreg-profiles-tmp.d
    sudo avreg-service stop
    sudo cp /tmp/avreg-profiles-tmp.d/* /etc/avreg/profiles/
    sudo systemctrl daemon-reload
    sudo avreg-service start

Append

1.  sudo cp <NEW-PROFILE-NAME> /etc/avreg/profiles/
2.  sudo systemctrl daemon-reload
3.  sudo avreg-service start <NEW-PROFILE-NAME>

Remove

1.  sudo avreg-service stop <PROFILE-NAME>
2.  sudo rm /etc/avreg/profiles/<PROFILE-NAME>
3.  sudo systemctrl daemon-reload

Rename

1.  sudo avreg-service stop <OLD-PROFILE-NAME>
2.  (cd /etc/avreg/profiles && sudo mv <OLD-PROFILE-NAME> <NEW-PROFILE-NAME>)
3.  sudo systemctrl daemon-reload
4.  sudo avreg-service start <NEW-PROFILE-NAME>

Mask

1.  sudo avreg-service stop <PROFILE-NAME>
2.  (cd /etc/avreg/profiles && sudo mv <PROFILE-NAME> <NEW-PROFILE-NAME>~)
3.  sudo systemctrl daemon-reload
