使用filebrowser 怎么设置一些默认的参数

filebrowser 提供一些默认的设置文件,这些文件通常位于以下三个文件夹中名字是 .filebrowser.{json, toml, yaml, yml}

- ./
- $HOME/
- /etc/filebrowser/

怎么使用

  1. 首先建立以文件 cat ~/.filebrowser.json
  2. 新建一个文件夹 mkdir ~/filebrowser.cn
  3. 在文件夹 ~/filebrowser.cn 中运行 filebrowser 看看结果

~/.filebrowser.json 的内容是

cat ~/.filebrowser.json
{
    "port": "4444",
    "webname" : "filebrowser.cn"
}

这里只设置一个端口作为测试。

[root@ filebrowser.cn]$filebrowser
2020/10/16 22:09:54 Using config file: /root/.filebrowser.json
2020/10/16 22:09:54 Listening on 127.0.0.1:4444

可以看到使用了配置文件 /root/.filebrowser.json

Was this helpful?

2 / 5

发表评论 0

Your email address will not be published. Required fields are marked *