diff --git a/sabnzbd/deployment.yaml b/sabnzbd/deployment.yaml index 81d02f3..ef09af2 100644 --- a/sabnzbd/deployment.yaml +++ b/sabnzbd/deployment.yaml @@ -23,6 +23,8 @@ kind: Deployment metadata: namespace: sabnzbd name: sabnzbd + annotations: + "reloader.stakater.com/auto": "true" spec: replicas: 1 selector: @@ -61,6 +63,10 @@ spec: capabilities: add: ["NET_ADMIN","SYS_TIME"] volumes: + - name: scripts + configMap: + name: sabnzbd-scripts + defaultMode: 0555 - name: config nfs: server: 172.16.18.1 @@ -80,6 +86,8 @@ spec: - name: PGID value: "101" volumeMounts: + - mountPath: /scripts + name: scripts - mountPath: /volume1/dropbox name: dropbox - mountPath: /config diff --git a/sabnzbd/scripts.yaml b/sabnzbd/scripts.yaml new file mode 100644 index 0000000..6a89f15 --- /dev/null +++ b/sabnzbd/scripts.yaml @@ -0,0 +1,23 @@ +apiVersion: v1 +data: + pp.sh: | + #!/bin/bash + + set -e + cd "$SAB_COMPLETE_DIR" + + if [ $SAB_UNPACK -eq 0 ];then + echo Skipping Extra Unpack + exit 0 + fi + + if [ $SAB_UNPACK -ne 0 ];then + find . -name '*.part01.rar' -exec unrar x {} + + find . -name '*.zip' -exec unzip {} + + fi + +kind: ConfigMap +metadata: + creationTimestamp: null + name: sabnzbd-scripts + namespace: sabnzbd