我期待发送的仲裁员客户执行一个文字,改变所有犯法者的所有权和许可权,如果傲慢地完成下载的话。
我正在使用以下相关环境: json:
"download-dir": "/data/transmission/completed",
"script-torrent-done-enabled": true,
"script-torrent-done-filename": "/home/user/script.sh",
我知道,有些问题可以在文字内容之外处理。 文字档案的所有人是非布道,我已获准进入777份,因此,除非我在这里错过一些东西,否则就会出现发送文件的问题。
The /home/user/script.sh file is as follows:
#!/bin/bash
echo sudopassword | /usr/bin/sudo -S /bin/chmod -f -R 777 /data/transmission/completed
echo sudopassword | /usr/bin/sudo -S /bin/chown -f -R user /data/transmission/completed
I know it is poor form to use a sudo command in this fashion, but I can execute the script on it s own and it will work correctly. I am not sure why Transmission is not executing the script. Transmission supports some environment variables such as TR_TORRENT_NAME that I would like to use once the script is being triggered. Is there anything I am not setting up in the file that would prevent the script from working correctly and how would I use environment variables?