Skip to content

Instantly share code, notes, and snippets.

@lifehome
Created November 5, 2023 15:36
Show Gist options
  • Save lifehome/139d6e045acf4463f06d3182dd4b48d7 to your computer and use it in GitHub Desktop.
Save lifehome/139d6e045acf4463f06d3182dd4b48d7 to your computer and use it in GitHub Desktop.
aria2 auto add torrent config for inotify - bash - licensed on AGPL-3.0
# The directory to watch
WATCH_DIR=/.fresh_torrents
# Interval between command execution.
# Format: HH:MM:SS or just how many seconds
SETTLE_DURATION=5
# Execute command immediately if incoming changes have persisted for a spcified of time period.
# Format: HH:MM:SS or just how many seconds
MAX_WAIT_TIME=300
# Cooldown interval before every execution, limiting the maximum execution times per cycle.
# Format: HH:MM:SS or just how many seconds
MIN_PERIOD=0
# Bash command to be executed
COMMAND="/scripts/torrent_labour.sh /.fresh_torrents"
#==============================#
# #
# DO NOT EDIT BELOW! #
# #
#==============================#
# Set the user and group ID that you want to run the command as, as well as the umask. The user will be randomly
# generated. This is mostly so that files written by the command in any directory shared with the host will have the
# right IDs.
USER_ID=0
GROUP_ID=0
UMASK=0000
# This is a very good idea if your command modifies the WATCH_DIR in any way. You can easily trigger yourself because
# most programs don't worry about checking the current state before making a change. e.g. chmod will set the mode of a
# file even if it already has that mode.
IGNORE_EVENTS_WHILE_COMMAND_IS_RUNNING=1
# Set to true to use polling to detect changes. For non-linux file systems, such as Windows shares, you must use polling.
USE_POLLING=no
# Set this to 1 to log all events, for debugging purposes. WARNING! This creates copious amounts of confusing logging!
DEBUG=0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment