this is the first topic that comes up with searching for "unraid pause sabnzbd during mover"
So I thought I would answer it even tho it's old.
CA mover tuning allows you to run scripts when move starts and ends.
You can run a script to sent http request to sabnzbd to pause when move starts and resume when it ends
You can write this script however you want to
i created my own nodejs docker container with the npm module 'sabnzbd' installed
i then run that docker container to execute my scripts
this is my docker run sh script
#!/bin/sh
docker run -it --rm \
-v /mnt/user/appdata/seethruhead_sabnzbdscriptrunner/scripts:/usr/src/app/scripts \
-e URL=http://SABNZBDHOST:8080 \
-e APIKEY=YOURAPIKEY \
--network="YOURDOCKERNETWORK" \
seethruhead/sabnzbdscriptrunner node $1
CA mover schedule settings:
Script to run before mover (No checks, always runs): /mnt/user/appdata/seethruhead_sabnzbdscriptrunner/run.sh ./scripts/pause.js
Script to run after mover (No checks, always runs): /mnt/user/appdata/seethruhead_sabnzbdscriptrunner/run.sh ./scripts/resume.js
i places run.sh and my scripts folder into /mtn/user/appdata/seethruhead_sabnzbdscriptrunner
the scripts folder is mounted to my container
pause.js:
const SABnzbd = require('sabnzbd');
if (!(process.env.URL && process.env.APIKEY)) {
console.error('Missing URL OR APIKEY');
process.exit(1);
}
const client = new SABnzbd(process.env.URL, process.env.APIKEY);
client.version().then(version => {
console.log(version);
client.queue.pause().then(() => {
console.log('client paused');
process.exit(0);
})
}).catch(error => {
console.log('error');
console.log(error.message);
});
resume.js
const SABnzbd = require('sabnzbd');
if (!(process.env.URL && process.env.APIKEY)) {
console.error('Missing URL OR APIKEY');
process.exit(1);
}
const client = new SABnzbd(process.env.URL, process.env.APIKEY);
client.version().then(version => {
console.log(version);
client.queue.resume().then(() => {
console.log('client resumed');
process.exit(0);
})
}).catch(error => {
console.log('error');
console.log(error.message);
});
There are easier ways to do this but i wanted to use javascript for some reason.
hopefully this will answer the question for anyone googling for this search term