doitandbedone/ispyagentdvr-docker

missing commands folder

ispysoftware opened this issue · 13 comments

getting reports that commands list is empty (server menu, commands)

  • the setup script is missing a / at the end of commands, not sure if this is the issue?

docker run -it -p 8090:8090 -p 3478:3478/udp -p 50000-50010:50000-50010/udp
-v /appdata/ispyagentdvr/config/:/agent/Media/XML/
-v /appdata/ispyagentdvr/media/:/agent/Media/WebServerRoot/Media/
-v /appdata/ispyagentdvr/commands/:/agent/Commands/
-e TZ=America/Los_Angeles
--name ispyagentdvr doitandbedone/ispyagentdvr

Hi Sean, no this is not the cause. Docker doesn't copy the content of the folder on the destination volume.

...a question, does the /config folder already contain files or are they generated at the first start?

Yes this is the theory :) but in realty it doesn't happen this way. I've installed the image without the folder already present and the "commands" folder is created empty. I've verified this on two different machine.... and I don't understand why

I asked for /config to Sean because this folder is correctly populated. Instead /commands that should contains some files it's always empty. AgentDVR has some file already present in /commands folder.... some .bat files

As suspected the "Media" folder where resides "Config" folder, is created by AgentDVR on first start and populated with default files... instead the "Commands" folder is already present (and populated) in the .zip package of the software. This explain why "config" folder behaviour is different from "commands".

The mistery is why /Commands content isn't replicated on host path

After some searches on GG I found that when you mount a host directory into container, the contents of host directory shadow the contents of container. For this reason it's empty after install (because the new created directory is obviously empty). To avoid this, named volumes should be used... but named volumes resides on docker installation path and and they are not comfortable to use all the time.

Maybe a workaround should be made by AgentDVR copying the list of .bat files from a temporary folder to /Commands at first start, similar to how it creates and populates the folder "Media".

i've updated it to store all content in a content folder and install it to the relevant locations on first run

Thank you :)

@ispysoftware Is this still an issue? Since it's reopened.

Tested now in 4.3.3.0... \Commands folder is still empty

should be copying the commands in there on start, same as it does for masks and sounds - check the logs
seems to be working here

image

Closed as resolved