Properly using "exec"

Running FileBot from the console, Groovy / FileBot scripting, shell scripts, etc
Post Reply
Posts: 13
Joined: 26 Sep 2014, 11:46

Properly using "exec"

Post 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" \
User avatar
The Source
Posts: 21345
Joined: 16 Nov 2011, 08:59

Re: Properly using "exec"

Post by rednoah »

What does the log say?

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/ {quote f}"

Note that --action TEST will probably disable post-processing since there aren't actually going to be any files to be post-processed.
:idea: Please read the FAQ and How to Request Help.
Post Reply