Jump to content

JoeUnraidUser

Members
  • Content Count

    103
  • Joined

  • Last visited

Community Reputation

12 Good

About JoeUnraidUser

  • Rank
    Advanced Member

Recent Profile Visitors

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

  1. You are incorrect about CA User Scripts. A script cannot be scheduled to run at boot. Also, you can only run Bash scripts.
  2. You can't run a perl or python script using CA User Scripts. It also doesn't have an option to run a script at boot.
  3. Then how are we supposed to run scripts at boot?
  4. That's just ridiculous. I should be able to properly run a script on a Linux system. At boot I am running several perl, bash, and python scripts with many different parameters.
  5. All of the files on the flash drive are now set to 600 permission and it won't let you change the files to 700. So now I can't run any of my scripts at startup. All permissions on the flash drive used to be set to 777 so scripts could be run no problem.
  6. Check for movie.xml and mkv files in each movie folder. check_movies.sh #!/bin/bash movies="/mnt/user/test/movies" process() { local movieDir=$1 local mkv="$(find "$movieDir" -iname '*.mkv')" local xml="$(find "$movieDir" -iname 'movie.xml')" if [ -z "$mkv" ] || [ -z "$xml" ] then printf "$movieDir\n" [ -z "$mkv" ] && printf "\tmkv: file not found\n" [ -z "$xml" ] && printf "\tmovie.xml: file not found\n" fi } ls -1d "$movies"/*/ | sed 's/\/*$//' |\ while read movie do if [ -d "$movie/DVD1" ] then ls -1d "$movie"/DVD*/ | sed 's/\/*$//' |\ while read dvd do process "$dvd" done else process "$movie" fi done
  7. Do you want the script to move "movie.xml" to the parent directory like the mkv file? I could modify the script so that at the time of processing it checks if an mkv file exists, if not print a message. Or I could make a separate script to check if the files exist.
  8. The mv will give an error if AUDIO_TS or VIDEO_TS do not exist. I left the error in there so you could see if either directory wasn't present. I can suppress the error if you want. I believe the reason the mv failed may be because of the rev error. I modified the script to use sed instead of rev. It may fix the error.
  9. Too late. I already changed the script to accommodate for DVD# subfolders. It assumes the structure under each DVD# folder contains VIDEO_TS and AUDIO_TS.
  10. I changed the folders to be all lowercase to match up with \\tower\test\movies \\tower\test\backup Can you change the folders to lowercase or should I change the script back?
  11. Are your movies in \\tower\test\movies all lowercase?
  12. I changed the script so it also moves AUDIO_TS to the backup.
  13. That looks good except it didn't see a VIDEO_TS folder under "catch me if you can". Was there a folder VIDEO_TS folder under "catch me if you can"? Otherwise how did all the other movies work out?
  14. Yes. Note: 1. On Linux, slash / is used for folders instead of the Windows backslash \ 2. On Unraid, the share \\tower\test is represented on Linux as /mnt/user/test 3. Linux folder names are case sensitive. So your folder names in Linux should look like this: movies="/mnt/user/test/movies" backup="/mnt/user/test/backup"