From 992aea88fb0dbe240e3d4675fa595f0726009ed5 Mon Sep 17 00:00:00 2001 From: JP Dillingham Date: Sun, 16 Feb 2025 17:36:47 -0600 Subject: add script examples --- config/slskd.example.yml | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) (limited to 'config') diff --git a/config/slskd.example.yml b/config/slskd.example.yml index dd164084..ee5b6aaa 100644 --- a/config/slskd.example.yml +++ b/config/slskd.example.yml @@ -238,11 +238,27 @@ # on: # - DownloadFileComplete # - DownloadDirectoryComplete -# run: data/my_script.sh --json-to-process $EVENT -# my_logging_script: +# run: +# executable: ~ # if omitted, defaults to your operating system's $SHELL, or cmd.exe on Windows +# command: data/my_script.sh # the script reads the data from the $SLSKD_SCRIPT_DATA envar +# run_with_sh: # on: -# - All -# run: data/log_slskd_events.sh $DATA +# - DownloadFileComplete +# run: +# executable: /bin/sh +# command: '-c "echo $SLSKD_SCRIPT_DATA >> downloads.txt"' +# run_with_windows: +# on: +# - DownloadFileComplete +# run: +# executable: cmd.exe +# command: '/c "echo %SLSKD_SCRIPT_DATA% >> downloads.txt"' +# run_with_windows_git_bash: +# on: +# - DownloadFileComplete +# run: +# executable: C:\Program Files\Git\git-bash.exe +# command: '-c "echo $SLSKD_SCRIPT_DATA >> downloads.txt"' # ftp: # enabled: false # address: ~ -- cgit v1.2.3 From e1b3551c39224836eca93f8b8d12e082dae3b138 Mon Sep 17 00:00:00 2001 From: JP Dillingham Date: Mon, 17 Feb 2025 15:40:34 -0600 Subject: adjust script examples --- config/slskd.example.yml | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'config') diff --git a/config/slskd.example.yml b/config/slskd.example.yml index ee5b6aaa..3b6cd78c 100644 --- a/config/slskd.example.yml +++ b/config/slskd.example.yml @@ -234,20 +234,23 @@ # retry: # attempts: 3 # scripts: -# my_post_download_script: +# run_command_with_linux_system_shell: # slskd uses the executable defined in $SHELL # on: # - DownloadFileComplete -# - DownloadDirectoryComplete # run: -# executable: ~ # if omitted, defaults to your operating system's $SHELL, or cmd.exe on Windows -# command: data/my_script.sh # the script reads the data from the $SLSKD_SCRIPT_DATA envar +# command: '"echo '$SLSKD_SCRIPT_DATA' >> slskd_downloads.txt"' +# run_command_with_windows_system_shell: # slskd uses cmd.exe +# on: +# - DownloadFileComplete +# run: +# command: '"echo "%SLSKD_SCRIPT_DATA%" >> slskd_downloads.txt"' # run_with_sh: # on: # - DownloadFileComplete # run: # executable: /bin/sh -# command: '-c "echo $SLSKD_SCRIPT_DATA >> downloads.txt"' -# run_with_windows: +# args: '-c "echo $SLSKD_SCRIPT_DATA >> downloads.txt"' +# run_with_windows_cmd: # on: # - DownloadFileComplete # run: -- cgit v1.2.3 From 4706c88aff538cc175111d9a7ecb28e37f378a52 Mon Sep 17 00:00:00 2001 From: JP Dillingham Date: Sun, 23 Feb 2025 16:49:30 -0600 Subject: adjust examples --- config/slskd.example.yml | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) (limited to 'config') diff --git a/config/slskd.example.yml b/config/slskd.example.yml index 3b6cd78c..5ae868ab 100644 --- a/config/slskd.example.yml +++ b/config/slskd.example.yml @@ -255,13 +255,29 @@ # - DownloadFileComplete # run: # executable: cmd.exe -# command: '/c "echo %SLSKD_SCRIPT_DATA% >> downloads.txt"' +# args: '/c "echo %SLSKD_SCRIPT_DATA% >> downloads.txt"' # run_with_windows_git_bash: # on: # - DownloadFileComplete # run: # executable: C:\Program Files\Git\git-bash.exe -# command: '-c "echo $SLSKD_SCRIPT_DATA >> downloads.txt"' +# args: '-c "echo $SLSKD_SCRIPT_DATA >> downloads.txt"' +# run_with_sh_and_args_list: +# on: +# - DownloadFileComplete +# run: +# executable: /bin/sh +# args_list: +# - -c +# - echo $SLSKD_SCRIPT_DATA >> downloads.txt +# run_with_windows_cmd_and_args_list: +# on: +# - DownloadFileComplete +# run: +# executable: cmd.exe +# args_list: +# - /c +# - echo %SLSKD_SCRIPT_DATA% >> downloads.txt # ftp: # enabled: false # address: ~ -- cgit v1.2.3 From 8fc82b70cb7dac0c96156fc3604c64e8005e975a Mon Sep 17 00:00:00 2001 From: JP Dillingham Date: Wed, 26 Feb 2025 22:28:10 -0600 Subject: adjust windows script examples --- config/slskd.example.yml | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) (limited to 'config') diff --git a/config/slskd.example.yml b/config/slskd.example.yml index 5ae868ab..5b4a0179 100644 --- a/config/slskd.example.yml +++ b/config/slskd.example.yml @@ -238,38 +238,38 @@ # on: # - DownloadFileComplete # run: -# command: '"echo '$SLSKD_SCRIPT_DATA' >> slskd_downloads.txt"' -# run_command_with_windows_system_shell: # slskd uses cmd.exe +# command: 'echo "$SLSKD_SCRIPT_DATA" >> slskd_downloads.txt' +# run_with_sh: # on: # - DownloadFileComplete # run: -# command: '"echo "%SLSKD_SCRIPT_DATA%" >> slskd_downloads.txt"' -# run_with_sh: +# executable: /bin/sh +# args: '-c "echo $SLSKD_SCRIPT_DATA >> downloads.txt"' +# run_with_sh_and_args_list: # on: # - DownloadFileComplete # run: # executable: /bin/sh -# args: '-c "echo $SLSKD_SCRIPT_DATA >> downloads.txt"' -# run_with_windows_cmd: +# args_list: +# - -c +# - echo $SLSKD_SCRIPT_DATA >> downloads.txt +# run_command_with_windows_system_shell: # on: # - DownloadFileComplete # run: -# executable: cmd.exe -# args: '/c "echo %SLSKD_SCRIPT_DATA% >> downloads.txt"' -# run_with_windows_git_bash: +# command: 'echo "%SLSKD_SCRIPT_DATA%" >> windows_system_shell.txt' +# run_with_windows_cmd: # on: # - DownloadFileComplete # run: -# executable: C:\Program Files\Git\git-bash.exe -# args: '-c "echo $SLSKD_SCRIPT_DATA >> downloads.txt"' -# run_with_sh_and_args_list: +# executable: cmd.exe +# args: '/c "echo "%SLSKD_SCRIPT_DATA%" >> windows_cmd.txt"' +# run_with_windows_git_bash: # on: # - DownloadFileComplete # run: -# executable: /bin/sh -# args_list: -# - -c -# - echo $SLSKD_SCRIPT_DATA >> downloads.txt +# 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 @@ -277,7 +277,7 @@ # executable: cmd.exe # args_list: # - /c -# - echo %SLSKD_SCRIPT_DATA% >> downloads.txt +# - 'echo "%SLSKD_SCRIPT_DATA%" >> windows_cmd_and_args_list.txt' # ftp: # enabled: false # address: ~ -- cgit v1.2.3 From 82607d9bec665ae7497f5b86941985b3034647e2 Mon Sep 17 00:00:00 2001 From: JP Dillingham Date: Sat, 1 Mar 2025 18:01:33 -0600 Subject: tweak linux examples --- config/slskd.example.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'config') diff --git a/config/slskd.example.yml b/config/slskd.example.yml index 5b4a0179..7a12a2ea 100644 --- a/config/slskd.example.yml +++ b/config/slskd.example.yml @@ -234,17 +234,17 @@ # retry: # attempts: 3 # scripts: -# run_command_with_linux_system_shell: # slskd uses the executable defined in $SHELL +# run_command_with_linux_system_shell: # automatically uses the executable defined in $SHELL # on: # - DownloadFileComplete # run: -# command: 'echo "$SLSKD_SCRIPT_DATA" >> slskd_downloads.txt' +# command: 'echo "$SLSKD_SCRIPT_DATA" >> linux_system_shell.txt' # run_with_sh: # on: # - DownloadFileComplete # run: # executable: /bin/sh -# args: '-c "echo $SLSKD_SCRIPT_DATA >> downloads.txt"' +# args: '-c "echo $SLSKD_SCRIPT_DATA >> linux_sh.txt"' # run_with_sh_and_args_list: # on: # - DownloadFileComplete @@ -252,8 +252,8 @@ # executable: /bin/sh # args_list: # - -c -# - echo $SLSKD_SCRIPT_DATA >> downloads.txt -# run_command_with_windows_system_shell: +# - 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: -- cgit v1.2.3 From 2d6f298055d4b39e0a6fb3b5d39450f7cb85242e Mon Sep 17 00:00:00 2001 From: JP Dillingham Date: Sat, 1 Mar 2025 18:11:38 -0600 Subject: tweak examples again --- config/slskd.example.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'config') diff --git a/config/slskd.example.yml b/config/slskd.example.yml index 7a12a2ea..e76af51c 100644 --- a/config/slskd.example.yml +++ b/config/slskd.example.yml @@ -250,7 +250,7 @@ # - DownloadFileComplete # run: # executable: /bin/sh -# args_list: +# 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) @@ -275,7 +275,7 @@ # - DownloadFileComplete # run: # executable: cmd.exe -# args_list: +# arglist: # - /c # - 'echo "%SLSKD_SCRIPT_DATA%" >> windows_cmd_and_args_list.txt' # ftp: -- cgit v1.2.3