Page 1 of 1

Properly using "exec"

Posted: 17 Aug 2022, 16:01
by skinsvpn
My filebot call is working great except I can't get it to set permissions for me. I am using "exec" to send bash commands to change file ownership and permissions as well as start another script. The script runs as planned but the bash commands don't seem to execute. Is there problem with my usage?

Code: Select all

  docker exec FileBot /opt/filebot/filebot -script fn:amc --output '/mnt/user/media/' \
  --log-file amc.log \
  --action test \
  --conflict index -non-strict \
  --db TheMovieDB \
  --def pushbullet=$pushbullet_token \
  --def pushover=$pushover_userkey:$pushover_apitoken \
  "exec=chown -R nobody:users '{folder}/' ; chmod -R 775 '{folder}/' ; chmod 1777 '{folder}/' ; /opt/filebot/filebot -script fn:verify '{f}/'" \
  music=y artwork=y \
  ignore='idx|\.sub' \
  'movieFormat='"$movie_format" \
  'seriesFormat='"$series_format" \
  'musicFormat='"$music_format" \
  "$file_name" 

Re: Properly using "exec"

Posted: 17 Aug 2022, 20:16
by rednoah
1.
What does the log say?


2.
I'd use --def exec to call my own script, to make things more easy to maintain and more easy to test:

Code: Select all

--def exec="/path/to/my/script.sh {quote f}"

3.
Note that --action TEST will probably disable post-processing since there aren't actually going to be any files to be post-processed.