Register for the iXsystems Community to get an ad-free experience and exclusive discounts in our eBay Store.

Trying to Move the Zoneminder Config Location

Western Digital Drives - The Preferred Drives of FreeNAS and TrueNAS CORE

Clinderw

Member
Joined
Aug 11, 2013
Messages
90
Goal: I'd like to move the config details for Zoneminder to a location outside of the jail. This will allow me to blow the jail away as often as needed (has to redo recently).
Version: V1.32.3 (installed via Plugin...first time using this OOTB plugin)

With many of my other jails, I mount a dataset where the config data is stored where the config is supposed to be in the jail. I've also used RC files to in other spots but I'm not seeing how to do that with ZM.

Can anyone point me in the right direction - lot of Googling hasn't turned up much yet. Thanks in advance.
 

ere109

Member
Joined
Aug 22, 2017
Messages
157
I'm not sure if you've found a solution, but for Plex, the procedure is pasted below. I suspect the trick would be to do a search on which directory zoneminder stores its config files in, then create a similar path. Note, this is for PLEX - do not use with zoneminder without tweaking:
Code:
iocage exec plex mkdir -p /config
iocage exec plex mkdir -p /mnt/video
iocage fstab -a plex /mnt/tank1/apps/plex /config nullfs rw 0 0
iocage fstab -a plex /mnt/tank1/video /mnt/video nullfs ro 0 0
iocage exec plex chown -R plex:plex /config
iocage exec plex sysrc plexmediaserver_plexpass_support_path="/config"
 

sretalla

Dedicated Sage
Joined
Jan 1, 2016
Messages
3,071
You need to look in the /etc/rc.d directory for the zoneminder service definition to see if it's looking for a variable like plex does. Setting that value will do nothing if it isn't referenced by the rc.d script.
 

Clinderw

Member
Joined
Aug 11, 2013
Messages
90
Thanks for the replies. I've been able to get this working for Plex, Radar, Sonar, etc but not ZM. I gave up but will try to get it to work again when I have more time.
 

ere109

Member
Joined
Aug 22, 2017
Messages
157
I just came across this at the bottom of the ZM doc. Combine it with the above, and you may have a winner:
_____
Typically, path configurations now reside in /etc/zm.

Here is an example of the file hierarchy:
Code:
/etc/zm
├── conf.d
│   ├── 01-system-paths.conf
│   ├── 02-multiserver.conf
|   ├── 03-custom.conf #optional
│   └── README
├── objectconfig.ini # optional
├── zm.conf
└── zmeventnotification.ini #optional

The roles of the files are as follows:

zm.conf contains various base configuration entries. You should not edit this file as it may be overwritten on an upgrade.
zmeventnotification.ini is only present if you have installed the ZoneMinder Event Notification Server.
objectconfig.ini is only present if you have installed the machine learning hooks for the Event Notification Server.
conf.d contains additional configuration items as follows:
01-system-paths.conf contains all the paths that were once part of Options->Paths in the Web UI. You should not edit this file as it may be overwritten on an upgrade
02-multiserver.conf file consists of custom variables if you are deploying ZoneMinder in a multi-server configuration (see Multi-Server Install)
03-custom.conf is an custom config file that I created to override specific variables in the path files. This is the recommended way to customize entries. Anything that you want to change should be in a new file inside conf.d. Note that ZoneMinder will sort all the files alphabetically and run their contents in ascending order. So it doesn’t really matter what you name them, as long as you make sure your changes are not overwritten by another file in the sorting sequence. It is therefore good practice to prefix your file names by nn- where nn is a monotonically increasing numerical sequence 01- 02- 03- and so forth, so you know the order they will be processed.

Database Specific Configuration:

While the ZoneMinder specific database config entries reside in /etc/zm/zm.conf and related customizations discussed above, general database configuration items can be tweaked in /etc/mysql (or whichever path your DB server is installed)
 
Top