Run-script-before/after

In need of stopping selected Docker containers before running Duplicati backup, as some database files might be open at the time of backup and will end up with corrupt database files.

I am able to run ./shared/docker-stop.sh and ./shared/docker-start.sh under the Duplicati docker console docker exec -it duplicati /bin/bash so, the bash is doing what I am expecting.

Duplicati is showing the following error:
The script “/shared/docker-stop.sh” returned with exit code 1
please use the link below to see the verbose error at the bottom of the link

Follow this link for the following additional information
System Info, Duplicati Info and Errors, and Scripts Commands

Is Duplicati itself running as a container? If so, do your bash scripts work correctly if you run them manually from within that docker container?