mirror of
https://github.com/Radarr/Radarr.git
synced 2024-06-30 17:43:59 +02:00
Updated Custom Post Processing Scripts (markdown)
parent
f13ac54ddd
commit
c15618f77b
|
@ -104,23 +104,24 @@ Symlinking is preferable over hardlinking in most cases as the root movie folder
|
||||||
|
|
||||||
PERMPATH="$radarr_moviefile_path"
|
PERMPATH="$radarr_moviefile_path"
|
||||||
LINKPATH="$radarr_moviefile_sourcepath"
|
LINKPATH="$radarr_moviefile_sourcepath"
|
||||||
if [ -f "$LINKPATH" ];
|
|
||||||
then
|
if [[ -f "$LINKPATH" ]]; then
|
||||||
sleep 1
|
sleep 1
|
||||||
else
|
else
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
ORIGFILESIZE=$(stat -c%s "$LINKPATH")
|
ORIGFILESIZE=$(stat -c%s "$LINKPATH")
|
||||||
PERMFILESIZE=$(stat -c%s "$PERMPATH")
|
PERMFILESIZE=$(stat -c%s "$PERMPATH")
|
||||||
|
|
||||||
sleep 30
|
sleep 30
|
||||||
while [ $PERMFILESIZE != $ORIGFILESIZE ]
|
|
||||||
do
|
while [[ $PERMFILESIZE != $ORIGFILESIZE ]]; do
|
||||||
sleep 60
|
sleep 60
|
||||||
PERMFILESIZE=$(stat -c%s "$PERMPATH")
|
PERMFILESIZE=$(stat -c%s "$PERMPATH")
|
||||||
done
|
done
|
||||||
if [ $PERMFILESIZE == $ORIGFILESIZE ]
|
|
||||||
then
|
if [[ $PERMFILESIZE == $ORIGFILESIZE ]]; then
|
||||||
rm "$LINKPATH"
|
rm "$LINKPATH"
|
||||||
ln -s "$PERMPATH" "$LINKPATH"
|
ln -s "$PERMPATH" "$LINKPATH"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue
Block a user