trying to get Zmxap working

Forum for questions and support relating to the 1.32.x releases only.
Post Reply
lorenjz
Posts: 40
Joined: Fri Feb 28, 2020 12:25 am

trying to get Zmxap working

Post by lorenjz »

Hello,

I'm trying to get Zmxap working. I started by following this: https://forums.homeseer.com/forum/homes ... ostcount=1

I also consulted the wiki which mentioned that the www-data user would need to execute the pearl script. The only way I could find to accomplish this was like this:
sudo -u www-data /usr/local/zmxap/zmxap.pl -path=/usr/local/zmxap &
but that doesn't appear to be working. The logs don't seem to have been created.

Did I miss something or is there a better way to start the pearl script as the www-user when my ubuntu instance starts?

I
User avatar
iconnor
Posts: 2904
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: trying to get Zmxap working

Post by iconnor »

I would look into adding a proper systemd .service file for it. Something like :

# ZoneMinder zmxap systemd unit file
# This file is intended to work with all Linux distributions

[Unit]
Description=ZoneMinder CCTV recording and security system zmxap
After=network.target mysqld.service httpd.service zonoeminder.service
Requires=zoneminder.service

[Service]
User=www-data
Type=forking
Exec=/usr/local/bin/zmxap.pl
Environment=TZ=:/etc/localtime

[Install]
WantedBy=multi-user.target


Put that in /lib/systemd/system/zmxap.service
sudo systemctl enable zmxap.service
sudo systemctl start zmxap.service
Post Reply