Jump to content

Jorgen

Members
  • Content Count

    100
  • Joined

  • Last visited

Community Reputation

12 Good

About Jorgen

  • Rank
    Advanced Member
  • Birthday 02/04/1976

Converted

  • Gender
    Male
  • Location
    Manly, Australia

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Jorgen

    How to give a user permission to virsh?

    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
  2. Jorgen

    Bash script, add one extention to it

    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.
  3. Jorgen

    Bash script, add one extention to it

    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' \)
  4. Jorgen

    Bash script, add one extention to it

    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
  5. Jorgen

    Start/stop VMs on schedule

    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
  6. Jorgen

    Start/stop VMs on schedule

    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.
  7. Jorgen

    Bash script, add one extention to it

    Find can do multiples, but you need to wrap it with escaped parentheses for more than two "-or" operators. I haven't tried it with your script so don't know how it interacts with the other variables and parentheses. I think it should work though. find /mnt/user/downloads/completed/Filme \( -iname '*.iso' -or -iname '*.img' -or -iname '*.mkv' \) So the actual script would look like this (again, I haven't tested it, try it on a test directory/files first!): #!/bin/bash FROM_DIR=/mnt/user/downloads/completed/Filme TO_DIR=/mnt/user/downloads/DVDR FILES="$(find "$FROM_DIR" \( -iname '*.iso' -or -iname '*.img' -or -iname '*.mkv' \))" for FILES in $FILES; do DIR="$(basename "$(dirname "$FILES")")" mkdir -p "$TO_DIR"/"$DIR" mv "$FILES" "$TO_DIR"/"$DIR" done Alternatively, you could use find with regex instead of "-or" operators, might be easier if you have lots of extensions to add: FILES="$(find "$FROM_DIR" -regextype posix-egrep -regex '.*\.(iso|img|mkv)$')"
  8. Jorgen

    Load VM from Command Line?

    What you really want is this though
  9. Restarting AFP on unRAID should resolve it, quicker and less intrusive then a reboot. See this post for instructions and speculation on why it’s happening:
  10. Sorry not sure what to suggest next then. Maybe ensure you’re using the exact clover version from the video (I’ve had no luck with most recent release and high sierra), or try with osx key instead of FakeSMC. Or wait for the real experts to chime in. Sent from my iPhone using Tapatalk
  11. Try with two CPUs, and adjust the topology accordingly. I don’t think Mac OS likes a single cpu. And you are using FakeSMC in clover, right?
  12. Also check out this thread for some more thoughts on building in that case:
  13. I know this is too late, but I recommend a SFX PSU in that case. Nothing wrong with the seasonic, I have the exact same model. But it takes up more room than necessary and it doesn’t have a silent mode, the fan is always spinning. Space is at a premium in the node 304 especially when you have 4+ drives. You will discover this soon when trying to wrangle all the cables into submission... The standard case fans are pretty good too, I wasn’t able to justify the noctua cost when I was trying to make my server as silent as possible. Please post build logs! Sent from my iPhone using Tapatalk
  14. Jorgen

    [Support] Djoss - HandBrake

    Yes, latest stable version: https://handbrake.fr/downloads.php Sent from my iPhone using Tapatalk
  15. Jorgen

    [Support] Djoss - HandBrake

    If you want Handbrake 1.1.0 I think you need to use docker tag 1.14.1: https://github.com/jlesage/docker-handbrake/releases