aboutsummaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorJP Dillingham <jp@dillingham.me>2025-03-01 19:01:00 -0600
committerGitHub <noreply@github.com>2025-03-01 19:01:00 -0600
commit4de21d94899605accdba680eeff95b8dc38b59e2 (patch)
tree58f49ae44bbf246f686cec7bda3dff562774fa66 /config
parentbd3f8adf85bc5a1e6235af518de40001a25fba10 (diff)
parent9c50ae8b5d6e9b6de3d2a3fa26ed6317f50c4433 (diff)
downloadslskd-4de21d94899605accdba680eeff95b8dc38b59e2.tar.gz
Merge pull request #1292 from slskd/scripts
Refactor user-defined scripts
Diffstat (limited to 'config')
-rw-r--r--config/slskd.example.yml47
1 files changed, 41 insertions, 6 deletions
diff --git a/config/slskd.example.yml b/config/slskd.example.yml
index dd164084..e76af51c 100644
--- a/config/slskd.example.yml
+++ b/config/slskd.example.yml
@@ -234,15 +234,50 @@
# retry:
# attempts: 3
# scripts:
-# my_post_download_script:
+# run_command_with_linux_system_shell: # automatically uses the executable defined in $SHELL
# on:
# - DownloadFileComplete
-# - DownloadDirectoryComplete
-# run: data/my_script.sh --json-to-process $EVENT
-# my_logging_script:
+# run:
+# command: 'echo "$SLSKD_SCRIPT_DATA" >> linux_system_shell.txt'
+# run_with_sh:
# on:
-# - All
-# run: data/log_slskd_events.sh $DATA
+# - DownloadFileComplete
+# run:
+# executable: /bin/sh
+# args: '-c "echo $SLSKD_SCRIPT_DATA >> linux_sh.txt"'
+# run_with_sh_and_args_list:
+# on:
+# - DownloadFileComplete
+# run:
+# executable: /bin/sh
+# arglist:
+# - -c
+# - echo $SLSKD_SCRIPT_DATA >> linux_sh_and_args_list.txt
+# run_command_with_windows_system_shell: # automatically uses cmd.exe (included with all Windows installs)
+# on:
+# - DownloadFileComplete
+# run:
+# command: 'echo "%SLSKD_SCRIPT_DATA%" >> windows_system_shell.txt'
+# run_with_windows_cmd:
+# on:
+# - DownloadFileComplete
+# run:
+# executable: cmd.exe
+# args: '/c "echo "%SLSKD_SCRIPT_DATA%" >> windows_cmd.txt"'
+# run_with_windows_git_bash:
+# on:
+# - DownloadFileComplete
+# run:
+# executable: C:\Program Files\Git\bin\bash.exe
+# args: '-c "echo "$SLSKD_SCRIPT_DATA" >> windows_git_bash.txt"'
+# run_with_windows_cmd_and_args_list:
+# on:
+# - DownloadFileComplete
+# run:
+# executable: cmd.exe
+# arglist:
+# - /c
+# - 'echo "%SLSKD_SCRIPT_DATA%" >> windows_cmd_and_args_list.txt'
# ftp:
# enabled: false
# address: ~