From 01f7ad55c91bd4f3bbf70acfbb7035e427938a16 Mon Sep 17 00:00:00 2001 From: DaRealestUK Date: Wed, 13 Mar 2019 16:05:31 +0000 Subject: [PATCH] Create 30-config --- .../nzbget-mp4/cont-init.d/30-config | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 apps/templates/nzbget-mp4/cont-init.d/30-config diff --git a/apps/templates/nzbget-mp4/cont-init.d/30-config b/apps/templates/nzbget-mp4/cont-init.d/30-config new file mode 100644 index 0000000..deaaacd --- /dev/null +++ b/apps/templates/nzbget-mp4/cont-init.d/30-config @@ -0,0 +1,27 @@ +#!/usr/bin/with-contenv bash + +# delete lock file if found +[[ -f /downloads/nzbget.lock ]] && \ + rm /downloads/nzbget.lock + +# check if config file exists in /config +[[ ! -f /config/nzbget.conf ]] && \ + cp /defaults/nzbget.conf /config/nzbget.conf + +# permissions +chown 1000:1000 \ + /downloads +chown 1000:1000 -R \ + /app/nzbget \ + /config +chmod u+rw \ + /config/nzbget.conf + +chmod 777 -R \ + /config +chmod 777 -R \ + /app/nzbget +chmod 777 -R \ + /downloads + +exec /config/installer/installer.sh