Jorgen

Members
  • Posts

    269
  • Joined

  • Last visited

Everything posted by Jorgen

  1. Yes there is, on page 175 ๐Ÿ˜‰
  2. This is probably not the cause of your problem, but umask is not the same as normal chmod permission. For umask, you want 0000 for most open permissions, 0777 is actually the most restrictive. Also, the โ€œdownloadsโ€ directory (output) doesnโ€™t exist under /storage/Handbrake according to you screenshots. Not sure if Handbrake can create it for you on the fly, or if you need to create yourself first Sent from my iPhone using Tapatalk
  3. Script is case sensitive, you have the second letter โ€œtโ€ capitalized the wrong way round between the script and your utorrent VM names. Sent from my iPhone using Tapatalk
  4. Enter this command in the unraid terminal and it will give you the last file Handbrake opened for processing: grep Opening /mnt/cache/appdata/HandBrake/log/hb/conversion.log | tail -1 Adjust the path to wherever you have your Handbrake appdata
  5. Whatโ€™s your run command Sauso? If you run in bridge mode with privileged=off, you also need --cap-add๏ปฟ=๏ปฟNET_ADMIN๏ปฟ This was missing for me, probably because Iโ€™ve just been updating without problems for a long time and am using a very old template. It was causing all sorts of problems until I fixed it. Just a thought, might not be your problem. Sent from my iPhone using Tapatalk
  6. Here you go, just edit with your own watch folder path and set it up on a schedule with User Scripts. The script will first check that the folder exists, then start Handbrake if the folder is not empty. #!/bin/bash # Set the path to the Handbrake watch folder as seen from the Unraid command line WATCH="/mnt/user/Media/Handbrake_hotfolder/watch" if [ -d "$WATCH" ] && [ -n "$(ls -A "/$WATCH")" ]; then docker start HandBrake logger "HandBrake started by User Scripts" fi And here's what I do to stop it once the watch folder is emptied again. I only use the watch folder to process files. Not sure if this is safe to run if you are also processing files via the GUI at the same time. I think it will shut down the container mid-processing in that case.
  7. Yep, I do. I have a script on a cron schedule in User Scripts that checks if the watch folder contains any files once every night. If it does, the script starts the container. Then I use a hook script to shut down the container when the watch folder is empty. See a few posts up for that script. End result is that Handbrake only runs at night, and only when there is work to be done. I can post the start script when I get home tonight if youโ€™re interested? Sent from my iPhone using Tapatalk
  8. Hi @Djoss, saw the notification from github that you added the post_watch_folder_processing hook, thank you so much for that! To test, I pulled down the latest image and added the following post-watch script: #!/bin/sh # # This is an example of a post watch folder processing hook. This script is # always invoked with /bin/sh (shebang ignored). # # The argument of the script is the path to the watch folder. # WATCH_FOLDER=$1 echo "post-watch folder processing: Watch folder = $WATCH_FOLDER" if [ -d "/$WATCH_FOLDER" ] && [ -z "$(ls -A "$WATCH_FOLDER")" ]; then echo "watch folder empty, shutting down" killall -sigterm ghb fi And it worked beautifully: [autovideoconverter] Conversion ended successfully. [autovideoconverter] Removed /watch/movie.mp4'. [autovideoconverter] Watch folder '/watch' processing terminated. [autovideoconverter] Executing post watch folder processing hook... post-watch folder processing: Watch folder = /watch watch folder empty, shutting down [autovideoconverter] Post watch folder processing hook exited with 0 [autovideoconverter] Conversion ended successfully. [autovideoconverter] Removed /watch/movie.mp4'. [autovideoconverter] Watch folder '/watch' processing terminated. [autovideoconverter] Executing post watch folder processing hook... post-watch folder processing: Watch folder = /watch watch folder empty, shutting down [autovideoconverter] Post watch folder processing hook exited with 0 [services.d] stopping services [services.d] stopping app... [services.d] stopping x11vnc... caught signal: 15 26/03/2019 23:50:01 deleted 40 tile_row polling images. [services.d] stopping statusmonitor... [services.d] stopping openbox... [services.d] stopping logmonitor... [services.d] stopping xvfb... [services.d] stopping autovideoconverter... [services.d] stopping nginx... [services.d] stopping certsmonitor... [services.d] stopping s6-fdholderd... [cont-finish.d] executing container finish scripts... [cont-finish.d] done. [s6-finish] syncing disks. [s6-finish] sending all processes the TERM signal. [s6-finish] sending all processes the KILL signal and exiting. So again, thank you!
  9. From the handbrake UI you need to set the destination folder to: /output/finished Sent from my iPhone using Tapatalk
  10. Done. Let me know if/when you need help with testing. Thanks for all your work on this container, it's very very useful.
  11. Ok, "killall -sigterm ghb" works well, at least when running manually in the container shell. But I've run into another problem. The post-conversion hook runs before the watch folder is cleaned up, so I can't look for an empty folder. [autovideoconverter] Executing post-conversion hook... post-conversion: Status = 0 post-conversion: Output File = /output/movie.mkv post-conversion: Source File = /watch/movie.mp4 post-conversion: Preset = Mathias_MKV_720p30_v2 [autovideoconverter] Post-conversion hook exited with 0 [autovideoconverter] Conversion ended successfully. [autovideoconverter] Removed /watch/movie.mp4 I could use the source file parameter to test if the watch folder only contains that file, but that has two problems: 1. Source files in sub folders will trip it up 2. Not sure if the watch folder purge have time to run before the container is shut down by the script Hmm, might have to resort to a scheduled external script polling the watch folder.
  12. Great, thanks to both of you! Sent from my iPhone using Tapatalk
  13. Since hooks are all the rage at the moment, Iโ€™ll throw my question into the ring as well! At the end of each conversion I want to check if the watch folder is empty and if it is, shut down the container. I know I can do the first bit with a post processing hook, but is it possible to stop the container from the container shell? If it is, whatโ€™s the command? Sent from my iPhone using Tapatalk
  14. Try the steps in the post above to restart the daemon from within deluge UI after enabling the plugin
  15. Yeah sorry about that, I wrote it from memory and deluge doesn't have a file menu... To get the plugins to stick: 1. Enable the plugin in deluge preferences 2. Open connection manager 3. Select the host you're connected to 4. Stop the daemon (at this point you can check that the plugin has been added to core.conf) 5. Start the daemon 6. Connect to the now running daemon 7. Stop and start the container 8. Open deluge preferences and confirm plugin is now enabled Please report back if this solves the problem for you
  16. Looks like your VM is named HassOI in unraid template, not HassIO. Sent from my iPhone using Tapatalk
  17. I had this problem and fixed it by installing the plugin, re-starting deluge from within the container, i.e. from the deluge file menu, and then restarting the container itself. Plugin has persisted all restarts since. There is a label plugin you can just turn on that will give the sorting options. Sent from my iPhone using Tapatalk
  18. Thanks for confirming. Iโ€™m planning to migrate existing backups over to SMB when I eventually upgrade to 6.7 and was hoping someone had successfully blazed that trail already. Canโ€™t see why it wouldnโ€™t work though.
  19. Did you set up a brand new backup, or did you transfer an existing one from an AFP share? Sent from my iPhone using Tapatalk
  20. Look into Wake On LAN. I use Mocha WOL on my iOS devices, in combination with WOL unsaid plugin. Itโ€™s really simple to use once configured: start the app, click on โ€œwake upโ€ and click on the VM name in the list (your daughter would just have one to select from) Setting it up is straight forward to, just need to plug in the IP and MAC address of the VM. Sent from my iPhone using Tapatalk
  21. Ok, the two find commands return identical lists, so that's not it. The problem is this: The $FILES list is using spaces as delimiters, which is also used in the "for in do" loop This only works as long as none of the paths in the list contains spaces If they do, you get the errors you are seeing. Your original script have the same problem, so I guess you must have never run it over files containing spaces before? One fix is to use find -exec instead of a "for in do" loop on the find result. I'm not skilled enough to write that though, but here are some hints if you want to give it a crack: https://stackoverflow.com/questions/301039/how-can-i-escape-white-space-in-a-bash-loop-list Another way to achieve the same thing is to use rsync instead of find. The drawback is that this is actually a copy-then-delete operation, so will be slower than using mv. This script should work for you: #!/bin/bash FROM_DIR="/mnt/user/downloads/completed/Filme" TO_DIR="/mnt/user/downloads/DVDR" rsync -ar --include '*/' --include '*.iso' --include '*.img' --include '*.mkv' --exclude '*' --remove-source-files --prune-empty-dirs --progress "$FROM_DIR/" "$TO_DIR" find "$FROM_DIR/" -depth -empty -type d -delete # This removes empty directories in the source directory Folder structure before running the script in my test (I used slightly different paths compared to you): downloads/ โ”œโ”€โ”€ DVDR โ””โ”€โ”€ completed โ”œโ”€โ”€ movie with spaces โ”‚ โ””โ”€โ”€ movie with spaces.iso โ”œโ”€โ”€ movie1 โ”‚ โ””โ”€โ”€ movie1.iso โ”œโ”€โ”€ movie2 โ”‚ โ””โ”€โ”€ movie2.img โ”œโ”€โ”€ movie3 โ”‚ โ””โ”€โ”€ movie3.mkv โ”œโ”€โ”€ movie4 โ”‚ โ””โ”€โ”€ movie4.avi โ”œโ”€โ”€ movie5.avi โ””โ”€โ”€ movie6.mkv And after running the script: downloads/ โ”œโ”€โ”€ DVDR โ”‚ โ”œโ”€โ”€ movie with spaces โ”‚ โ”‚ โ””โ”€โ”€ movie with spaces.iso โ”‚ โ”œโ”€โ”€ movie1 โ”‚ โ”‚ โ””โ”€โ”€ movie1.iso โ”‚ โ”œโ”€โ”€ movie2 โ”‚ โ”‚ โ””โ”€โ”€ movie2.img โ”‚ โ”œโ”€โ”€ movie3 โ”‚ โ”‚ โ””โ”€โ”€ movie3.mkv โ”‚ โ””โ”€โ”€ movie6.mkv โ””โ”€โ”€ completed โ”œโ”€โ”€ movie4 โ”‚ โ””โ”€โ”€ movie4.avi โ””โ”€โ”€ movie5.avi You can see that it has moved all .iso. img. and .mkv files, while leaving .avi in place, and retaining the folder sturcutre form the source directory. Note that movie6.mkv was in the root of the source directory, and therefore ended up in the root of the destination DVDR folder. The script only retains existing parent folders, it doesn't create new ones. Hope that works for you.
  22. Maybe, but I don't think so. To test, run these two commands and compare the output: find "/mnt/user/downloads/completed/Filme" -iname '*.iso' -or -iname '*.img' find "/mnt/user/downloads/completed/Filme" \( -iname '*.iso' -or -iname '*.img' -or -iname '*.mkv' \)
  23. Yeah, Iโ€™m out of my depth here, but I think youโ€™re right that you need to enclose the path with double quotes somewhere. Although it looks like the script is doing that already. Just to confirm I understood your use case correctly. You want the script to: 1. identify all files with a certain extension in the source directory 2. create a sub-directory in the source directory with the name of the found file 3. move the file into the new sub-directory For step 1, are the files always in the root of the source directory? Or are they buried in multiple levels of sub folders? If they are in sub-folders, you donโ€™t want that folder structure replicated? Sent from my iPhone using Tapatalk
  24. Just realised I have a need to start the VM on a schedule too. This super simple script will do the trick, scheduled from the Users Scripts plugin with a custom cron. #!/bin/bash virsh start "<name-of-VM>" Replace <name-of-VM> with the VM name as shown in the unraid UI
  25. Yeah, you can't sleep a Mac VM from the unraid side. In fact, I don't think you can use the Mac OS sleep function from within the VM either, from memory I was never able to wake it up again when I played around with that. For my Mac VM I set a scheduled shutdown from the Mac System Preferences/Energy Saver/Schedule. Then I start it on-demand with the WOL plugin and a WOL app on my phone. But I'm sure you could also schedule a start via User Scripts. The built-in Mac scheduler has an option for scheduling starts as well, but I doubt it would work in a VM.