#2881
|
||||
|
||||
@wizhack: Thanks for sharing your findings and feedback. Would have been my next question to check if bash is available
check ownership/permission for the nfs share or mount that the docker user will be mapped to correct nfs user
__________________
JD-Dev & Server-Admin |
#2882
|
|||
|
|||
Quote:
so the mv command doesn't act like a normal bash command (for the folder part) so i have to find a way to move folder, the easy way would be: mkdir in /mnt/4K with filename > cp file in the "newfolder" > rm -R old folder, dirty way in my opinions... if you have suggestions i'm open ! |
#2883
|
||||
|
||||
@wizhack: maybe check if mv might be part of internal bash but also be available as stand alone mv executable with different feature set? most likely it's something like that
__________________
JD-Dev & Server-Admin |
#2884
|
|||
|
|||
This is it !
so the built-in mv comand in alpine-linux is a part of busybox so it's explain why it was acting weird because i didn't know that i was looking for using a mv from coreutils. so here i did: Install the coreutils package in the container (alpine linux) Code:
apk add coreutils utmps Code:
mv --version Code:
mv (GNU coreutils) 9.1 |
#2885
|
||||
|
||||
@wizhack: thanks for feedback and confirmation
__________________
JD-Dev & Server-Admin |
#2886
|
|||
|
|||
Here is my script, i used 2 trigger 1 for package finished and 1 for extraction finished
Move folder based on name of file with a script shell Don't forget to check the box for preventing running the script in parallel Code:
var movefolder = '/config/scripts/movefolder.sh'; callSync(movefolder); And the movefolder.sh Code:
#!/bin/bash # Check subfolder from /output find /output -mindepth 1 -maxdepth 1 -type d | while IFS= read -r dir; do # check for *.part files if find "$dir" -type f -name "*.part" -print -quit | grep -q .; then echo "Le dossier $dir contient des fichiers avec l'extension .part. Il est ignoré." continue fi # Extract namefolder dirname=$(basename "$dir") # if folder has *1080*, *2160*, *4k*, ou *s??e??* if [[ $dirname == *1080* || $dirname == *2160* || $dirname == *4k* || $dirname == *s??e??* || $dirname == *s??* ]]; then # Si le dossier contient un fichier .rar, afficher un message d'erreur et passer au suivant if find "$dir" -type f -name "*.rar" -print -quit | grep -q .; then echo "Un fichier .rar a été détecté dans le dossier $dir. Le dossier est ignoré." continue fi # Déplacer le dossier vers le répertoire de destination approprié if [[ $dirname == *s??e??* ]]; then mv "$dir" "/mnt/FR-TV/" elif [[ $dirname == *1080* ]]; then mv "$dir" "/mnt/FR-HD/" elif [[ $dirname == *2160* || $dirname == *4k* ]]; then mv "$dir" "/mnt/FR-4K/" fi fi done Last edited by wizhack; 15.04.2024 at 19:06. |
#2887
|
||||
|
||||
@wizhack: Thanks for sharing your whole solution
__________________
JD-Dev & Server-Admin |
#2888
|
|||
|
|||
Would it be possible to make a script so that JD plays a (selectable) acoustic signal after, for example, 4 minutes without an internet connection (after a reconnect)? So if the reconnect hadn't worked? The signal could then be repeated, for example, every 5 minutes (as long as there is no internet connection). Can be stopped when an internet connection is available again.
__________________
Aktuelles Windows Last edited by Dockel; 17.04.2024 at 08:31. |
#2889
|
||||
|
||||
@Dockel: Yes, that should be possible, better ask mgpai, our scripter magician, for help or do some "trial and error" by yourself
__________________
JD-Dev & Server-Admin |
#2890
|
|||
|
|||
Oops, sorry, I thought if it was about scripts, one asked in this thread here, in which - I thought - magpai is also present. So where do I have to ask?
I guess, by doing some "trial and error" by myself I just would destroy JD completely.
__________________
Aktuelles Windows |
Thread Tools | |
Display Modes | |
|
|