Properly using "exec"

Running FileBot from the console, Groovy scripting, shell scripts, etc
Post Reply
skinsvpn
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" \
  "$file_name" 
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Properly using "exec"

Post 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.
:idea: Please read the FAQ and How to Request Help.
Post Reply