BleachingLlama

Members
  • Posts

    3
  • Joined

  • Last visited

Everything posted by BleachingLlama

  1. I appreciate the detailed reply. Do you mind sharing which path on the Cache drive you used? Do I need to turn on something to see better mover logs? When I try to press the "Move" button with the scripts enabled, the mover does not actually start, I assume its some sort of script issue I set the following paths: /mnt/cache/system/scripts/stop-downloaders-for-mover.sh /mnt/cache/system/scripts/start-downloaders-for-mover.sh I believe I have permissions set up properly, here is following the paths and looking at chmod: root@Tower:/mnt# cd cache/ root@Tower:/mnt/cache# ls -l total 0 drwxrwxrwx 1 nobody users 402 Feb 26 11:38 appdata/ drwxrwxrwx 1 nobody users 26 Feb 25 17:45 data/ drwxrwxrwx 1 nobody users 12 Feb 24 02:41 domains/ drwxrwxrwx 1 nobody users 40 Feb 26 11:50 system/ root@Tower:/mnt/cache# cd system/ root@Tower:/mnt/cache/system# ls -l total 0 drwxrwxrwx 1 nobody users 20 Feb 23 19:27 docker/ drwxrwxrwx 1 nobody users 22 Feb 23 19:27 libvirt/ drwxrwxrwx 1 root root 118 Feb 26 13:43 scripts/ root@Tower:/mnt/cache/system# cd scripts/ root@Tower:/mnt/cache/system/scripts# ls -l total 8 -rwxrwxrwx 1 root root 508 Feb 26 13:43 start-downloaders-for-mover.sh* -rwxrwxrwx 1 root root 508 Feb 26 13:43 stop-downloaders-for-mover.sh* I'll share my scripts I spent some time on them and think they are quite good (maybe jq can be optimized). Kills any container connected to my VPN, then the VPN: #!/bin/bash # Docker ID for qbittorrentvpn VPN_CONTAINER_ID=$(docker inspect qbittorrentvpn | jq -r '.[].Id') # Looks for all containers using the network by ID, uses JQ to extract those container IDs and passes them to docker stop docker container ls -aq | xargs docker container inspect --format='{{json .}}' | jq -r "select(.HostConfig.NetworkMode == \"container:$VPN_CONTAINER_ID\")" | jq -s '.' | jq '. | map(.Id)' | jq -r '.[]' | xargs docker stop # Now stop qbittorrentvpn docker stop $VPN_CONTAINER_ID Starts the VPN, then containers connected to VPN #!/bin/bash # Docker ID for qbittorrentvpn VPN_CONTAINER_ID=$(docker inspect qbittorrentvpn | jq -r '.[].Id') # Start qbittorrentvpn docker start $VPN_CONTAINER_ID # Looks for all containers using the network by ID, uses JQ to extract those container IDs and passes them to docker start docker container ls -aq | xargs docker container inspect --format='{{json .}}' | jq -r "select(.HostConfig.NetworkMode == \"container:$VPN_CONTAINER_ID\")" | jq -s '.' | jq '. | map(.Id)' | jq -r '.[]' | xargs docker start
  2. Is it possible to install `test` to use comparators in Bash on unRaid? I have a script to check for missing hard links and to alert me via Pushover if found. The issue is I do not think `if [ $NO_DUPLICATES_FOUND_TEXT_COUNT -eq 0 ]; then` is supported in Unraid PUSHOVER_APP_TOKEN="" PUSHOVER_USER_TOKEN="" PUSHOVER_MESSAGE="Override this with message" JDUPE_RESULTS=$(jdupes -M -r -Q "/mnt/user/data/torrents/" "/mnt/user/data/media/") echo $JDUPE_RESULTS NO_DUPLICATES_FOUND_TEXT_COUNT=$(echo $JDUPE_RESULTS | grep -c "No duplicates found") DUPLICATES_FOUND=false if [ $NO_DUPLICATES_FOUND_TEXT_COUNT -eq 0 ]; then # No duplicates text not found, there are potential duplicates DUPLICATES_FOUND=true PUSHOVER_MESSAGE="A Jdupe quick scan indicated $NO_DUPLICATES_FOUND_TEXT_COUNT missing available hard links. This can be fixed with other userscripts in the userscripts plugin" curl -X POST -H "Content-Type: application/json" -d "{\"token\": \"${PUSHOVER_APP_TOKEN}\", \"user\": \"${PUSHOVER_USER_TOKEN}\", \"message\": \"${PUSHOVER_MESSAGE}\"}" https://api.pushover.net/1/messages.json echo "Duplicates were found" exit 1 fi PUSHOVER_MESSAGE="A Jdupe quick scan passed: $NO_DUPLICATES_FOUND_TEXT_COUNT missing hard links" exit 0 echo $DUPLICATES_FOUND
  3. Hello, Thank you for providing this script! I have a question about the `Script to run before mover` and `Script to after before mover` feature. I would like to stop my docker container called `qbittorrentvpn` when mover starts, and start it again after. So I have the following path set and the script looks like so Script to run before mover: `/boot/config/plugins/user.scripts/scripts/Stop-Qbittorrent/script` ``` root@Tower:~# cat /boot/config/plugins/user.scripts/scripts/Stop-Qbittorrent/script #!/bin/bash docker stop -t 60 qbittorrentvpn ``` Script to run after mover: `/boot/config/plugins/user.scripts/scripts/Start-Qbittorrent/script` ``` root@Tower:~# cat /boot/config/plugins/user.scripts/scripts/Start-Qbittorrent/script #!/bin/bash docker start qbittorrentvpn ``` At the bottom of the settings there is a setting for "Move Now button follows plug-in filters." Its defaulted to no, and I changed this to Yes. But if I hit "Run Mover" in the UI my docker container is not killed. Are the rules only applied if the Mover is run on the schedule? Thank you!