geerlingguy/pi-nvr

Consider a systemd service based approach

isaric opened this issue · 3 comments

isaric commented

Hi @geerlingguy ,

I'm also in the business of Raspberry Pi NVRs/DVRs and I've decided to roll my own approach.
After balking at the complexity of Shinobi, I decided to use a systemd service based approach.

I have one project for recording via ffmpeg and another for doing motion detection on ONVIF-compliant devices
that expose motion events (ie. using the built-in capabilities of the camera). The first one is pure bash and the other is
golang but both run via systemd.

What my project of projects lacks is what you mentioned in your issue #1 - a simple frontend where you can just hand it a url
and you can setup a dashboard for live viewing. I'm still brainstorming that part as I don't write code that deals with UDP or websockets often.

Please consider checking out my approach with these two projects. I'd be happy to work on making the install process easier via a script/wizard.

Probably less about systemd, and more about the unix philosophy and micro services - I am using a similar approach [with systemd]

isaric commented

@dcousens Thanks for taking a look. I usually associate microservices with web applications. In this case the we are talking about scripts that run locally. They do get their content from the network but there is no communication between components.

I added a Makefile that completes a system-wide install of all of the compiled binaries and install systemd service files that can be used with environment files for templates.