今天尝试使用openwrt后台的rclone时,GUI页面总是报错。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
Error connecting. Please check username password and verify if rclone is working at the specified IP.
Error connecting. Please check username password and verify if rclone is working at the specified IP.
Error connecting. Please check username password and verify if rclone is working at the specified IP.

换成http://IP:PORT登录后,又会提示Not Found,找了半天原因。

后来才发现是系统自带的命令没有加上“--rc-web-gui”来开启GUI,所以就一直提示Unauthorized Username。

需要编辑一下/etc/init.d/rclone这个文件。

先打开编辑器

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
vim /etc/init.d/rclone
vim /etc/init.d/rclone
vim /etc/init.d/rclone

在73行处插入两句

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
procd_append_param command "--rc-web-gui"
procd_append_param command "--rc-files=/www/rclone-webui-react"
procd_append_param command "--rc-web-gui" procd_append_param command "--rc-files=/www/rclone-webui-react"
	procd_append_param command "--rc-web-gui"
	procd_append_param command "--rc-files=/www/rclone-webui-react"

这样应该就可以了。